1*1dcdf01fSchristos=pod 2*1dcdf01fSchristos 3*1dcdf01fSchristos=head1 NAME 4*1dcdf01fSchristos 5*1dcdf01fSchristosRSA_blinding_on, RSA_blinding_off - protect the RSA operation from timing attacks 6*1dcdf01fSchristos 7*1dcdf01fSchristos=head1 SYNOPSIS 8*1dcdf01fSchristos 9*1dcdf01fSchristos #include <openssl/rsa.h> 10*1dcdf01fSchristos 11*1dcdf01fSchristos int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); 12*1dcdf01fSchristos 13*1dcdf01fSchristos void RSA_blinding_off(RSA *rsa); 14*1dcdf01fSchristos 15*1dcdf01fSchristos=head1 DESCRIPTION 16*1dcdf01fSchristos 17*1dcdf01fSchristosRSA is vulnerable to timing attacks. In a setup where attackers can 18*1dcdf01fSchristosmeasure the time of RSA decryption or signature operations, blinding 19*1dcdf01fSchristosmust be used to protect the RSA operation from that attack. 20*1dcdf01fSchristos 21*1dcdf01fSchristosRSA_blinding_on() turns blinding on for key B<rsa> and generates a 22*1dcdf01fSchristosrandom blinding factor. B<ctx> is B<NULL> or a preallocated and 23*1dcdf01fSchristosinitialized B<BN_CTX>. 24*1dcdf01fSchristos 25*1dcdf01fSchristosRSA_blinding_off() turns blinding off and frees the memory used for 26*1dcdf01fSchristosthe blinding factor. 27*1dcdf01fSchristos 28*1dcdf01fSchristos=head1 RETURN VALUES 29*1dcdf01fSchristos 30*1dcdf01fSchristosRSA_blinding_on() returns 1 on success, and 0 if an error occurred. 31*1dcdf01fSchristos 32*1dcdf01fSchristosRSA_blinding_off() returns no value. 33*1dcdf01fSchristos 34*1dcdf01fSchristos=head1 COPYRIGHT 35*1dcdf01fSchristos 36*1dcdf01fSchristosCopyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. 37*1dcdf01fSchristos 38*1dcdf01fSchristosLicensed under the OpenSSL license (the "License"). You may not use 39*1dcdf01fSchristosthis file except in compliance with the License. You can obtain a copy 40*1dcdf01fSchristosin the file LICENSE in the source distribution or at 41*1dcdf01fSchristosL<https://www.openssl.org/source/license.html>. 42*1dcdf01fSchristos 43*1dcdf01fSchristos=cut 44