Codebase list libcryptx-perl / 9e02336
sync ltc Karel Miko 7 years ago
2 changed file(s) with 4 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4444 255, 255, 255, 255 };
4545 #endif /* LTC_BASE64 */
4646
47 static const unsigned char map_base64url[] = {
4748 #if defined(LTC_BASE64_URL)
48 static const unsigned char map_base64url[256] = {
4949 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
5050 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
5151 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
6767 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
6868 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
6969 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
70 255, 255, 255, 255 };
70 255, 255, 255, 255
7171 #endif /* LTC_BASE64_URL */
72 };
7273
7374 enum {
7475 relaxed = 0,
101101 if ((err = mp_read_unsigned_bin(key->k, (unsigned char *)buf, keysize)) != CRYPT_OK) { goto errkey; }
102102
103103 /* ECC key pair generation according to FIPS-186-4 (B.4.2 Key Pair Generation by Testing Candidates):
104 * the generated private key k should be the range [1, order–1]
104 * the generated private key k should be the range [1, order-1]
105105 * a/ N = bitlen(order)
106106 * b/ generate N random bits and convert them into big integer k
107107 * c/ if k not in [1, order-1] go to b/