< prev index next >

src/java.base/share/classes/java/security/spec/MGF1ParameterSpec.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 27,53 **** import java.security.spec.AlgorithmParameterSpec; /** * This class specifies the set of parameters used with mask generation ! * function MGF1 in OAEP Padding and RSA-PSS signature scheme, as * defined in the ! * <a href="http://www.ietf.org/rfc/rfc3447.txt">PKCS #1 v2.1</a> ! * standard. * * <p>Its ASN.1 definition in PKCS#1 standard is described below: * <pre> ! * MGF1Parameters ::= OAEP-PSSDigestAlgorthms * </pre> * where * <pre> * OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= { * { OID id-sha1 PARAMETERS NULL }| * { OID id-sha224 PARAMETERS NULL }| * { OID id-sha256 PARAMETERS NULL }| * { OID id-sha384 PARAMETERS NULL }| ! * { OID id-sha512 PARAMETERS NULL }, * ... -- Allows for future expansion -- * } * </pre> * @see PSSParameterSpec * @see javax.crypto.spec.OAEPParameterSpec --- 27,61 ---- import java.security.spec.AlgorithmParameterSpec; /** * This class specifies the set of parameters used with mask generation ! * function MGF1 in OAEP Padding and RSASSA-PSS signature scheme, as * defined in the ! * <a href="https://tools.ietf.org/rfc/rfc8017.txt">PKCS#1 v2.2</a> standard. * * <p>Its ASN.1 definition in PKCS#1 standard is described below: * <pre> ! * PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= { ! * { OID id-mgf1 PARAMETERS HashAlgorithm }, ! * ... -- Allows for future expansion -- ! * } * </pre> * where * <pre> + * HashAlgorithm ::= AlgorithmIdentifier { + * {OAEP-PSSDigestAlgorithms} + * } + * * OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= { * { OID id-sha1 PARAMETERS NULL }| * { OID id-sha224 PARAMETERS NULL }| * { OID id-sha256 PARAMETERS NULL }| * { OID id-sha384 PARAMETERS NULL }| ! * { OID id-sha512 PARAMETERS NULL }| ! * { OID id-sha512-224 PARAMETERS NULL }| ! * { OID id-sha512-256 PARAMETERS NULL }, * ... -- Allows for future expansion -- * } * </pre> * @see PSSParameterSpec * @see javax.crypto.spec.OAEPParameterSpec
*** 57,91 **** * @since 1.5 */ public class MGF1ParameterSpec implements AlgorithmParameterSpec { /** ! * The MGF1ParameterSpec which uses "SHA-1" message digest. */ public static final MGF1ParameterSpec SHA1 = new MGF1ParameterSpec("SHA-1"); /** ! * The MGF1ParameterSpec which uses "SHA-224" message digest. */ public static final MGF1ParameterSpec SHA224 = new MGF1ParameterSpec("SHA-224"); /** ! * The MGF1ParameterSpec which uses "SHA-256" message digest. */ public static final MGF1ParameterSpec SHA256 = new MGF1ParameterSpec("SHA-256"); /** ! * The MGF1ParameterSpec which uses "SHA-384" message digest. */ public static final MGF1ParameterSpec SHA384 = new MGF1ParameterSpec("SHA-384"); /** ! * The MGF1ParameterSpec which uses SHA-512 message digest. */ public static final MGF1ParameterSpec SHA512 = new MGF1ParameterSpec("SHA-512"); private String mdName; /** * Constructs a parameter set for mask generation function MGF1 * as defined in the PKCS #1 standard. --- 65,115 ---- * @since 1.5 */ public class MGF1ParameterSpec implements AlgorithmParameterSpec { /** ! * The MGF1ParameterSpec which uses "SHA-1" message digest */ public static final MGF1ParameterSpec SHA1 = new MGF1ParameterSpec("SHA-1"); + /** ! * The MGF1ParameterSpec which uses "SHA-224" message digest */ public static final MGF1ParameterSpec SHA224 = new MGF1ParameterSpec("SHA-224"); + /** ! * The MGF1ParameterSpec which uses "SHA-256" message digest */ public static final MGF1ParameterSpec SHA256 = new MGF1ParameterSpec("SHA-256"); + /** ! * The MGF1ParameterSpec which uses "SHA-384" message digest */ public static final MGF1ParameterSpec SHA384 = new MGF1ParameterSpec("SHA-384"); + /** ! * The MGF1ParameterSpec which uses SHA-512 message digest */ public static final MGF1ParameterSpec SHA512 = new MGF1ParameterSpec("SHA-512"); + /** + * The MGF1ParameterSpec which uses SHA-512/224 message digest + */ + public static final MGF1ParameterSpec SHA512_224 = + new MGF1ParameterSpec("SHA-512/224"); + + /** + * The MGF1ParameterSpec which uses SHA-512/256 message digest + */ + public static final MGF1ParameterSpec SHA512_256 = + new MGF1ParameterSpec("SHA-512/256"); + private String mdName; /** * Constructs a parameter set for mask generation function MGF1 * as defined in the PKCS #1 standard.
< prev index next >