src/share/classes/java/security/spec/PSSParameterSpec.java

Print this page


   1 /*
   2  * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  30 
  31 /**
  32  * This class specifies a parameter spec for RSA-PSS signature scheme,
  33  * as defined in the
  34  * <a href="http://www.ietf.org/rfc/rfc3447.txt">PKCS#1 v2.1</a>
  35  * standard.
  36  *
  37  * <p>Its ASN.1 definition in PKCS#1 standard is described below:
  38  * <pre>
  39  * RSASSA-PSS-params ::= SEQUENCE {
  40  *   hashAlgorithm      [0] OAEP-PSSDigestAlgorithms  DEFAULT sha1,
  41  *   maskGenAlgorithm   [1] PKCS1MGFAlgorithms  DEFAULT mgf1SHA1,
  42  *   saltLength         [2] INTEGER  DEFAULT 20,
  43  *   trailerField       [3] INTEGER  DEFAULT 1
  44  * }
  45  * </pre>
  46  * where
  47  * <pre>
  48  * OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
  49  *   { OID id-sha1 PARAMETERS NULL   }|

  50  *   { OID id-sha256 PARAMETERS NULL }|
  51  *   { OID id-sha384 PARAMETERS NULL }|
  52  *   { OID id-sha512 PARAMETERS NULL },
  53  *   ...  -- Allows for future expansion --
  54  * }
  55  *
  56  * PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
  57  *   { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
  58  *   ...  -- Allows for future expansion --
  59  * }
  60  * </pre>
  61  * <p>Note: the PSSParameterSpec.DEFAULT uses the following:
  62  *     message digest  -- "SHA-1"
  63  *     mask generation function (mgf) -- "MGF1"
  64  *     parameters for mgf -- MGF1ParameterSpec.SHA1
  65  *     SaltLength   -- 20
  66  *     TrailerField -- 1
  67  *
  68  * @see MGF1ParameterSpec
  69  * @see AlgorithmParameterSpec


   1 /*
   2  * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  30 
  31 /**
  32  * This class specifies a parameter spec for RSA-PSS signature scheme,
  33  * as defined in the
  34  * <a href="http://www.ietf.org/rfc/rfc3447.txt">PKCS#1 v2.1</a>
  35  * standard.
  36  *
  37  * <p>Its ASN.1 definition in PKCS#1 standard is described below:
  38  * <pre>
  39  * RSASSA-PSS-params ::= SEQUENCE {
  40  *   hashAlgorithm      [0] OAEP-PSSDigestAlgorithms  DEFAULT sha1,
  41  *   maskGenAlgorithm   [1] PKCS1MGFAlgorithms  DEFAULT mgf1SHA1,
  42  *   saltLength         [2] INTEGER  DEFAULT 20,
  43  *   trailerField       [3] INTEGER  DEFAULT 1
  44  * }
  45  * </pre>
  46  * where
  47  * <pre>
  48  * OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
  49  *   { OID id-sha1 PARAMETERS NULL   }|
  50  *   { OID id-sha224 PARAMETERS NULL }|
  51  *   { OID id-sha256 PARAMETERS NULL }|
  52  *   { OID id-sha384 PARAMETERS NULL }|
  53  *   { OID id-sha512 PARAMETERS NULL },
  54  *   ...  -- Allows for future expansion --
  55  * }
  56  *
  57  * PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
  58  *   { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
  59  *   ...  -- Allows for future expansion --
  60  * }
  61  * </pre>
  62  * <p>Note: the PSSParameterSpec.DEFAULT uses the following:
  63  *     message digest  -- "SHA-1"
  64  *     mask generation function (mgf) -- "MGF1"
  65  *     parameters for mgf -- MGF1ParameterSpec.SHA1
  66  *     SaltLength   -- 20
  67  *     TrailerField -- 1
  68  *
  69  * @see MGF1ParameterSpec
  70  * @see AlgorithmParameterSpec