comparison ecc.c @ 1069:2fa71c3b2827 pam

merge pam branch up to date
author Matt Johnston <matt@ucc.asn.au>
date Mon, 16 Mar 2015 21:34:05 +0800
parents 063c38ea622b
children 750ec4ec4cbe
comparison
equal deleted inserted replaced
1068:9a6395ddb1b6 1069:2fa71c3b2827
84 for different mp_int pointer without LTC_SOURCE */ 84 for different mp_int pointer without LTC_SOURCE */
85 static int ecc_is_point(ecc_key *key) 85 static int ecc_is_point(ecc_key *key)
86 { 86 {
87 mp_int *prime, *b, *t1, *t2; 87 mp_int *prime, *b, *t1, *t2;
88 int err; 88 int err;
89
90 prime = m_malloc(sizeof(mp_int));
91 b = m_malloc(sizeof(mp_int));
92 t1 = m_malloc(sizeof(mp_int));
93 t2 = m_malloc(sizeof(mp_int));
94 89
95 m_mp_alloc_init_multi(&prime, &b, &t1, &t2, NULL); 90 m_mp_alloc_init_multi(&prime, &b, &t1, &t2, NULL);
96 91
97 /* load prime and b */ 92 /* load prime and b */
98 if ((err = mp_read_radix(prime, key->dp->prime, 16)) != CRYPT_OK) { goto error; } 93 if ((err = mp_read_radix(prime, key->dp->prime, 16)) != CRYPT_OK) { goto error; }