RSA_blinding_on.pod 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 COPYRIGHT
  22. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  23. Licensed under the Apache License 2.0 (the "License"). You may not use
  24. this file except in compliance with the License. You can obtain a copy
  25. in the file LICENSE in the source distribution or at
  26. L<https://www.openssl.org/source/license.html>.
  27. =cut