RSA_blinding_on.pod 1.1 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 preallocated and
  14. initialized B<BN_CTX>.
  15. RSA_blinding_off() turns blinding off and frees the memory used for
  16. the blinding factor.
  17. =head1 RETURN VALUES
  18. RSA_blinding_on() returns 1 on success, and 0 if an error occurred.
  19. RSA_blinding_off() returns no value.
  20. =head1 COPYRIGHT
  21. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  22. Licensed under the Apache License 2.0 (the "License"). You may not use
  23. this file except in compliance with the License. You can obtain a copy
  24. in the file LICENSE in the source distribution or at
  25. L<https://www.openssl.org/source/license.html>.
  26. =cut