Appendix B: Algorithms

This appendix specifies details concerning some of the algorithms defined in Appendix A.

Specification
The following table shows the fields of the algorithm specifications.
Field Description
Name The name by which the algorithm is known. This is the name passed to the getInstance method (when requesting the algorithm), and returned by the getAlgorithm method to determine the name of an existing algorithm object. These methods are in the relevant engine classes: Signature, MessageDigest, KeyPairGenerator, and AlgorithmParameterGenerator.
Type The type of algorithm: Signature, MessageDigest, KeyPairGenerator, or ParameterGenerator.
Description General notes about the algorithm, including any standards implemented by the algorithm, applicable patents, and so on
KeyPair Algorithm (optional) The key pair algorithm for this algorithm.
Keysize (optional) For a keyed algorithm or key generation algorithm: the legal key sizes.
Size (optional) For an algorithm parameter generation algorithm: the legal sizes for algorithm parameter generation.
Parameter Defaults (optional) For a key generation algorithm: the default parameter values.
Signature Format (optional) For a Signature algorithm, the format of the signature, that is, the input and output of the verify and sign methods, respectively.
Algorithm Specifications
SHA-Family Message Digest Algorithms
Component Description
Name SHA-1, SHA-224, SHA-256, SHA-384, SHA-512
Type MessageDigest
Description The family of message digest algorithms as defined in the NIST FIPS 180-2. The output of these algorithm are a 160-bit, 256-bit, 384-bit, and 512-bit digest respectively.
MD2 Message Digest Algorithm
Component Description
Name MD2
Type MessageDigest
Description The message digest algorithm as defined in RFC 1319. The output of this algorithm is a 128-bit (16 byte) digest.
MD5 Message Digest Algorithm
Component Description
Name MD5
Type MessageDigest
Description The message digest algorithm as defined in RFC 1321. The output of this algorithm is a 128-bit (16 byte) digest.
The Digital Signature Algorithm
Component Description
Name SHA1withDSA, SHA2withDSA
Type Signature
Description This algorithm is the signature algorithm described in NIST FIPS 186-2, using DSA with the SHA-1 or SHA-256 message digest algorithm.
KeyPair Algorithm DSA
Signature Format ASN.1 sequence of two INTEGER values: r and s, in that order:
SEQUENCE ::= { r INTEGER, s INTEGER }
RSA-based Signature Algorithms
Component Description
Name MD2withRSA, MD5withRSA, SHA1withRSA, SHA2withRSA, SHA224withRSA, SHA3withRSA, SHA5withRSA, and Start of changes for service refresh 1RSAPSSEnd of changes for service refresh 1
Type Signature
Description These are the signature algorithms that use the MD2, MD5, SHA-1, SHA-256, SHA-384, and SHA-512 message digest algorithms (respectively) with RSA encryption.
Note: Start of changes for service refresh 6The RSA-PSS signature object cannot be initialized with a message digest algorithm that is not the same as the one supplied in the MGFParameterSpec.End of changes for service refresh 6
KeyPair Algorithm RSA
Signature Format DER-encoded PKCS #1 block as defined in RSA Laboratory's Public Key Cryptography Standards, section 9.2, Note #1. The data encrypted is the digest of the data signed.
DSA KeyPair Generation Algorithm
Component Description
Name DSA
Type KeyPairGenerator
Description This algorithm is the key pair generation algorithm described in NIST FIPS 186-2 for DSA.
Keysize The length, in bits, of the modulus p. This length must range from 512 to 2048, and must be a multiple of 64. The default keysize is 2048.
Parameter Defaults The following default parameter values are used for key sizes of 512, 768, 1024, and 2048 bits:
512-bit Key Parameters
p = fca682ce 8e12caba 26efccf7 110e526d b078b05e decbcd1e b4a208f3
 ae1617ae 01f35b91 a47e6df6 3413c5e1 2ed0899b cd132acd 50d99151
 bdc43ee7 37592e17
q = 962eddcc 369cba8e bb260ee6 b6a126d9 346e38c5
 
g = 678471b2 7a9cf44e e91a49c5 147db1a9 aaf244f0 5a434d64 86931d2d
 14271b9e 35030b71 fd73da17 9069b32e 2935630e 1c206235 4d0da20a
 6c416e50 be794ca4
768-bit key parameters
p = e9e64259 9d355f37 c97ffd35 67120b8e 25c9cd43 e927b3a9 670fbec5
 d8901419 22d2c3b3 ad248009 3799869d 1e846aab 49fab0ad 26d2ce6a
 22219d47 0bce7d77 7d4a21fb e9c270b5 7f607002 f3cef839 3694cf45
 ee3688c1 1a8c56ab 127a3daf
q = 9cdbd84c 9f1ac2f3 8d0f80f4 2ab952e7 338bf511
g = 30470ad5 a005fb14 ce2d9dcd 87e38bc7 d1b1c5fa cbaecbe9 5f190aa7
 a31d23c4 dbbcbe06 17454440 1a5b2c02 0965d8c2 bd2171d3 66844577
 1f74ba08 4d2029d8 3c1c1585 47f3a9f1 a2715be2 3d51ae4d 3e5a1f6a
 7064f316 933a346d 3f529252
1024-bit key parameters
p = fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80
 b6512669 455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b
 801d346f f26660b7 6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6
 1bf83b57 e7c6a8a6 150f04fb 83f6d3c5 1ec30235 54135a16 9132f675
 f3ae2b61 d72aeff2 2203199d d14801c7
q = 9760508f 15230bcc b292b982 a2eb840b f0581cf5
 
g = f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b
 3d078267 5159578e bad4594f e6710710 8180b449 167123e8 4c281613
 b7cf0932 8cc8a6e1 3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f
 0bfa2135 62f1fb62 7a01243b cca4f1be a8519089 a883dfe1 5ae59f06
 928b665e 807b5525 64014c3b fecf492a
2048-bit key parameters
p = c115bc66 e841220d 6abfe599 889f6fe1 97c49dd2 98899d00 42d97577
 0567a0df 4115bc66 e841220d 6abfe599 889f6fe1 97c49dd2 98899d00
 42d97577 0567a0de 4115bc66 e841220d 6abfe599 889f6fe1 97c49dd2
 98899d00 42d97577 0567a0dd 4115bc66 e841220d 6abfe599 889f6fe1
 97c49dd2 98899d00 42d97577 0567a0dc 4115bc66 e841220d 6abfe599
 889f6fe1 97c49dd2 98899d00 42d97577 0567a0db 4115bc66 e841220d
 6abfe599 889f6fe1 97c49dd2 98899d00 42d97577 0567a0da 4115bc66
 e841220d 6abfe599 889f6fe1 97c49dd2 98899d00 42d97577 0567a0d8
 a33e8495 af620db3 27e75cb7 9ca8052e d2c4aa4e 58e219a7 02663966
 9ef0113d
q = e9550410 aa0c0e1c 6e1c19b6 8c3868d9 0c0b3c0f 0d3a3285 48ed9c9b 01628d33
g = 859e4107 d0e0ace0 9b35a6ea 852fe0cf 1b24de40 9eefb72b b5248710
 dde91307 8f6a9152 8b4f018d 50ba4348 9221ff68 1156ff9f 2a62e9d1
 8dae17e6 b9de9372 6c4f2885 8e34edfc 153089f9 3587fbfd 86ca0429
 29422d78 91d8956a 94c9ba31 83210e6c da1b470d 342258e9 ab21e704
 e7bd0a9a 4f209d14 14be360d a4bfaccd a253e452 35b096c0 6251c45c
 4df2180b 032ada33 33f0ec9b c56c4852 b30552af 415fa099 7f5b9463
 7dc53cc5 4ef6056a e1e7e6e7 9e46d74a 9d435284 51df7488 c7d5e3ea
 59ead4d2 b3f6d238 a2feeee4 c7ba219b f18bc796 f91cb6ba 7a7b9782
 dc98cdfc 2a10ed31 946b4c4f 302dedf6 b1532737 23d7b86b a8ca62b2
 506d0e3e
RSA KeyPair Generation Algorithm
Component Description
Name RSA
Type KeyPairGenerator
Description This algorithm is the key pair generation algorithm described in PKCS #1.
Strength Any integer that is a multiple of 8, greater than or equal to 512.
DSA Parameter Generation Algorithm
Component Description
Name DSA
Type ParameterGenerator
Description This algorithm is the parameter generation algorithm described in NIST FIPS 186-2 for DSA.
Strength The length, in bits, of the modulus p. This length must range from 512 to 2048, and must be a multiple of 64. The default size is 2048.