RSA_blinding_on.pod 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. =pod
  2. =head1 NAME
  3. RSA_blinding_on, RSA_blinding_off - protect the RSA operation from timing attacks
  4. =head1 SYNOPSIS
  5. #include <openssl/rsa.h>
  6. int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
  7. void RSA_blinding_off(RSA *rsa);
  8. =head1 DESCRIPTION
  9. RSA is vulnerable to timing attacks. In a setup where attackers can
  10. measure the time of RSA decryption or signature operations, blinding
  11. must be used to protect the RSA operation from that attack.
  12. RSA_blinding_on() turns blinding on for key B<rsa> and generates a
  13. random blinding factor. B<ctx> is B<NULL> or a pre-allocated and
  14. initialized B<BN_CTX>. The random number generator must be seeded
  15. prior to calling RSA_blinding_on().
  16. RSA_blinding_off() turns blinding off and frees the memory used for
  17. the blinding factor.
  18. =head1 RETURN VALUES
  19. RSA_blinding_on() returns 1 on success, and 0 if an error occurred.
  20. RSA_blinding_off() returns no value.
  21. =head1 SEE ALSO
  22. L<rsa(3)|rsa(3)>, L<rand(3)|rand(3)>
  23. =head1 HISTORY
  24. RSA_blinding_on() and RSA_blinding_off() appeared in SSLeay 0.9.0.
  25. =cut