From 12fd92723d71325b74a6c94eee4ca504773ad9da Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 6 Sep 2015 13:46:41 -0400 Subject: Add ECPoint I/O functions. ASN.1 cleanup. --- rsa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rsa.c') diff --git a/rsa.c b/rsa.c index 8ac2d50..b863fdd 100644 --- a/rsa.c +++ b/rsa.c @@ -9,7 +9,7 @@ * (but no simpler). * * Much of the code in this module is based, at least loosely, on Tom - * St Denis's libtomcrypt code. + * St Denis's libtomcrypt code. * * Authors: Rob Austein * Copyright (c) 2015, SUNET @@ -394,7 +394,7 @@ hal_error_t hal_rsa_decrypt(const hal_rsa_key_t * const key, err = modexp(&i, &key->d, &key->n, &o); else err = rsa_crt(key, &i, &o); - + if (err != HAL_OK || (err = unpack_fp(&o, output, output_len)) != HAL_OK) goto fail; @@ -549,7 +549,7 @@ hal_error_t hal_rsa_key_get_public_exponent(const hal_rsa_key_t * const key, /* * Generate a prime factor for an RSA keypair. - * + * * Get random bytes, munge a few bits, and stuff into a bignum. Keep * doing this until we find a result that's (probably) prime and for * which result - 1 is relatively prime with respect to e. @@ -695,7 +695,7 @@ hal_error_t hal_rsa_key_to_der(const hal_rsa_key_t * const key, */ der += hlen; - + #define _(x) { size_t i; if ((err = hal_asn1_encode_integer(x, der, &i, vlen)) != HAL_OK) return err; der += i; vlen -= i; } RSAPrivateKey_fields; #undef _ -- cgit v1.2.3