Switched from NIST curve P-384 to RFC 5639 curve brainpoolP384r1.

This commit is contained in:
akwizgran
2013-11-24 15:11:46 +00:00
parent 0325bba86c
commit 27c4306e03
6 changed files with 99 additions and 50 deletions

View File

@@ -5,9 +5,27 @@ public interface AuthorConstants {
/** The maximum length of an author's name in UTF-8 bytes. */
int MAX_AUTHOR_NAME_LENGTH = 50;
/** The maximum length of a public key in bytes. */
/**
* The maximum length of a public key in bytes.
* <p>
* Public keys use SEC1 format: 0x04 x y, where x and y are unsigned
* big-endian integers.
* <p>
* For a 384-bit elliptic curve, the maximum length is 2 * (384/8) + 1.
*/
int MAX_PUBLIC_KEY_LENGTH = 97;
/** The maximum length of a signature in bytes. */
/**
* The maximum length of a signature in bytes.
* <p>
* A signature is an ASN.1 DER sequence containing two integers, r and s.
* The format is 0x30 len1 0x02 len2 r 0x02 len3 s, where len1 is
* len(0x02 len2 r 0x02 len3 s) as a DER length, len2 is len(r) as a DER
* length, len3 is len(s) as a DER length, and r and s are signed
* big-endian integers of minimal length.
* <p>
* For a 384-bit elliptic curve, the lengths are one byte each, so the
* maximum length is 2 * (384/8) + 8.
*/
int MAX_SIGNATURE_LENGTH = 104;
}