--- old/src/java.base/share/classes/java/security/interfaces/RSAKey.java 2018-05-11 15:03:42.023669200 -0700 +++ new/src/java.base/share/classes/java/security/interfaces/RSAKey.java 2018-05-11 15:03:41.491392500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,9 +26,12 @@ package java.security.interfaces; import java.math.BigInteger; +import java.security.spec.AlgorithmParameterSpec; /** - * The interface to an RSA public or private key. + * The interface to a public or private key in + * PKCS#1 v2.2 standard, + * such as those for RSA, or RSASSA-PSS algorithms. * * @author Jan Luehe * @@ -46,4 +49,20 @@ * @return the modulus */ public BigInteger getModulus(); + + /** + * Returns the parameters associated with this key. + * The parameters are optional and may be either + * explicitly specified or implicitly created during + * key pair generation. + * + * @implSpec + * The default implementation returns {@code null}. + * + * @return the associated parameters, may be null + * @since 11 + */ + default AlgorithmParameterSpec getParams() { + return null; + } }