1*e71b7053SJung-uk Kim=pod 2*e71b7053SJung-uk Kim 3*e71b7053SJung-uk Kim=head1 NAME 4*e71b7053SJung-uk Kim 5*e71b7053SJung-uk KimRSA_blinding_on, RSA_blinding_off - protect the RSA operation from timing attacks 6*e71b7053SJung-uk Kim 7*e71b7053SJung-uk Kim=head1 SYNOPSIS 8*e71b7053SJung-uk Kim 9*e71b7053SJung-uk Kim #include <openssl/rsa.h> 10*e71b7053SJung-uk Kim 11*e71b7053SJung-uk Kim int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); 12*e71b7053SJung-uk Kim 13*e71b7053SJung-uk Kim void RSA_blinding_off(RSA *rsa); 14*e71b7053SJung-uk Kim 15*e71b7053SJung-uk Kim=head1 DESCRIPTION 16*e71b7053SJung-uk Kim 17*e71b7053SJung-uk KimRSA is vulnerable to timing attacks. In a setup where attackers can 18*e71b7053SJung-uk Kimmeasure the time of RSA decryption or signature operations, blinding 19*e71b7053SJung-uk Kimmust be used to protect the RSA operation from that attack. 20*e71b7053SJung-uk Kim 21*e71b7053SJung-uk KimRSA_blinding_on() turns blinding on for key B<rsa> and generates a 22*e71b7053SJung-uk Kimrandom blinding factor. B<ctx> is B<NULL> or a pre-allocated and 23*e71b7053SJung-uk Kiminitialized B<BN_CTX>. The random number generator must be seeded 24*e71b7053SJung-uk Kimprior to calling RSA_blinding_on(). 25*e71b7053SJung-uk Kim 26*e71b7053SJung-uk KimRSA_blinding_off() turns blinding off and frees the memory used for 27*e71b7053SJung-uk Kimthe blinding factor. 28*e71b7053SJung-uk Kim 29*e71b7053SJung-uk Kim=head1 RETURN VALUES 30*e71b7053SJung-uk Kim 31*e71b7053SJung-uk KimRSA_blinding_on() returns 1 on success, and 0 if an error occurred. 32*e71b7053SJung-uk Kim 33*e71b7053SJung-uk KimRSA_blinding_off() returns no value. 34*e71b7053SJung-uk Kim 35*e71b7053SJung-uk Kim=head1 COPYRIGHT 36*e71b7053SJung-uk Kim 37*e71b7053SJung-uk KimCopyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. 38*e71b7053SJung-uk Kim 39*e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License"). You may not use 40*e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 41*e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 42*e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 43*e71b7053SJung-uk Kim 44*e71b7053SJung-uk Kim=cut 45