This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 141
DsaPrivateKey
Shawn Willden edited this page Mar 7, 2015
·
1 revision
DSA private keys contain the following fields:
- "publicKey": The JSON representation of the corresponding DsaPublicKey
- "x": The secret exponent of this private key
- "size" : The size of the modulus in bits
Note: All fields are WebSafeBase64 encoded twos-complement representations of positive integers.
The digest size is 384 bits. SHA1 is used for the digest.
The KeyHash components are: [leftTrimZero(p).length] + [leftTrimZero(p)] + [leftTrimZero(q).length] + [leftTrimZero(q)] + [leftTrimZero(g).length] + [leftTrimZero(g)] + [leftTrimZero(y).length] + [leftTrimZero(y)]
The relevant parts of the KeyMetadata are as follows:
{
...
"purpose": "SIGN_AND_VERIFY",
"type": "DSA_PUB",
...
}
{
"publicKey": {
"g": (g_bytes),
"p": (p_bytes),
"q": (q_bytes),
"size": 1024,
"y": (y_bytes)
},
"size": 1024,
"x": (x_bytes)
}
1024 bit key size
1024 bit key size
Defaults to 2048 bits 1024, 2048, 3072 bit key sizes supported
If the compat flag is not set, then SHA224 is used as a digest for 2048 bit key sizes and SHA256 is used for 3072 bit key sizes.