Blinding (cryptography): Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Daask
Adding short description: "Computing without having input or output"
 
imported>AliBabbaD
m External links: Remove link that occurs as reference
Line 1: Line 1:
{{Short description|Computing without having input or output}}
{{Short description|Computing without having input or output}}
{{More citations needed|date=January 2024}}
In [[cryptography]], '''blinding''' first became known in the context of [[blind signatures]], where the message author ''blinds'' the message with a random ''blinding factor'', the signer then signs it and the message author "''unblinds"'' it'';'' signer and message author are different parties.


In [[cryptography]], '''blinding''' is a technique by which an agent can provide a service to (i.e., compute a [[function (mathematics)|function]] for) a client in an encoded form without knowing either the real input or the real output.  Blinding techniques also have applications to preventing [[side-channel attack]]s on encryption devices.
Since the late 1990s, '''blinding''' mostly refer to countermeasures against [[side-channel attacks]] on encryption devices<ref>{{Cite journal |last=Kocher |first=Paul C. |date=1996 |editor-last=Koblitz |editor-first=Neal |title=Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems |url=https://link.springer.com/chapter/10.1007/3-540-68697-5_9 |journal=Advances in Cryptology — CRYPTO ’96 |language=en |location=Berlin, Heidelberg |publisher=Springer |pages=104–113 |doi=10.1007/3-540-68697-5_9 |isbn=978-3-540-68697-2}}</ref>, where the random ''blinding'' and the "''unblinding"'' happen on the encryption devices.


More precisely, [[Alice and Bob|Alice]] has an input ''x'' and Oscar has a function ''f''. Alice would like Oscar to compute {{nowrap|1=''y'' = ''f''(''x'')}} for her without revealing either ''x'' or ''y'' to him. The reason for her wanting this might be that she doesn't know the function ''f'' or that she does not have the resources to compute it.
Blinding must be applied with care, for example [[Rabin cryptosystem|Rabin–Williams]] signatures. If blinding is applied to the formatted message but the random value does not honor Jacobi requirements on ''p'' and ''q'', then it could lead to private key recovery. A demonstration of the recovery can be seen in "Common Vulnerabilities and Exposures"<ref>{{Cite web |title=CVE-2015-2141 Common Vulnerabilities and Exposures {{!}} SUSE |url=https://www.suse.com/security/cve/CVE-2015-2141.html |access-date=2025-06-13 |website=www.suse.com |language=en-us}}</ref> discovered by Evgeny Sidorov.
Alice "blinds" the message by encoding it into some other input ''E''(''x'');  the encoding ''E'' must be a [[bijection]] on the input space of ''f'', ideally a random permutation. Oscar gives her ''f''(''E''(''x'')), to which she applies a decoding ''D'' to obtain {{nowrap|1=''D''(''f''(''E''(''x''))) = ''y''}}.


Not all functions allow for blind computation. At other times, blinding must be applied with care. An example of the latter is [[Rabin cryptosystem|Rabin–Williams]] signatures. If blinding is applied to the formatted message but the random value does not honor Jacobi requirements on ''p'' and ''q'', then it could lead to private key recovery. A demonstration of the recovery can be seen in {{CVE|2015-2141}}<ref>{{Cite web |title=CVE - CVE-2015-2141 |url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=2015-2141 |access-date=2023-12-13 |website=cve.mitre.org}}</ref> discovered by Evgeny Sidorov.
The [[one-time pad]] (OTP) is an application of blinding to the secure communication problem, by its very nature. Alice would like to send a message to Bob secretly, however all of their communication can be read by Oscar. Therefore, Alice sends the message after blinding it with a secret key or OTP that she shares with Bob. Bob reverses the blinding after receiving the message. In this example, both blinding and its reversal typically use the [[exclusive disjunction|XOR]] operation.
 
A common application of blinding is in [[blind signature|blind signatures]]. In a blind signature protocol, the signer digitally signs a message without being able to learn its content.
 
The [[one-time pad]] (OTP) is an application of blinding to the secure communication problem, by its very nature. Alice would like to send a message to Bob secretly, however all of their communication can be read by Oscar. Therefore, Alice sends the message after blinding it with a secret key or OTP that she shares with Bob. Bob reverses the blinding after receiving the message. In this example, the function
''f'' is the [[identity function|identity]] and ''E'' and ''D'' are both typically the [[exclusive disjunction|XOR]] operation.


Blinding can also be used to prevent certain [[side-channel attack]]s on [[asymmetric key encryption algorithm|asymmetric encryption schemes]].  Side-channel attacks allow an adversary to recover information about the input to a cryptographic operation, by measuring something other than the algorithm's result, e.g., power consumption, computation time, or radio-frequency emanations by a device.  Typically these attacks depend on the attacker knowing the characteristics of the algorithm, as well as (some) inputs.  In this setting, blinding serves to alter the algorithm's input into some unpredictable state.  Depending on the characteristics of the blinding function, this can prevent some or all leakage of useful information.  Note that security depends also on the resistance of the blinding functions themselves to side-channel attacks.
Blinding can also be used to prevent certain [[side-channel attack]]s on [[asymmetric key encryption algorithm|asymmetric encryption schemes]].  Side-channel attacks allow an adversary to recover information about the input to a cryptographic operation, by measuring something other than the algorithm's result, e.g., power consumption, computation time, or radio-frequency emanations by a device.  Typically these attacks depend on the attacker knowing the characteristics of the algorithm, as well as (some) inputs.  In this setting, blinding serves to alter the algorithm's input into some unpredictable state.  Depending on the characteristics of the blinding function, this can prevent some or all leakage of useful information.  Note that security depends also on the resistance of the blinding functions themselves to side-channel attacks.


For example, in [[RSA (algorithm)|RSA]] blinding involves computing the blinding operation {{nowrap|1=''E''(''x'') = ''(xr)<sup>e</sup>'' mod ''N''}}, where ''r'' is a random integer between 1 and ''N'' and [[relatively prime]] to ''N'' (i.e. {{nowrap|1=gcd(''r'', ''N'') = 1)}}, ''x'' is the plaintext, ''e'' is the public RSA exponent and ''N'' is the RSA modulus.  As usual, the decryption function {{nowrap|1=''f''(''z'') = ''z<sup>d</sup>'' mod ''N''}} is applied thus giving {{nowrap|1=''f''(''E''(''x'')) = ''(xr)<sup>ed</sup>'' mod ''N'' =  ''xr'' mod ''N''}}. Finally it is unblinded using the function {{nowrap|1=''D''(''z'') = ''zr''<sup>−1</sup> mod ''N''}}. Multiplying {{nowrap|''xr'' mod ''N''}} by {{nowrap|''r<sup>−1</sup>'' mod ''N''}} yields {{nowrap|''x''}}, as desired. When decrypting in this manner, an adversary who is able to measure time taken by this operation would not be able to make use of this information (by applying timing attacks RSA is known to be vulnerable to) as she does not know the constant ''r'' and hence has no knowledge of the real input fed to the RSA primitives.
== Examples ==
* In [[RSA (algorithm)|RSA]] blinding involves computing the blinding operation {{nowrap|1=''E''(''x'') = ''(xr)<sup>e</sup>'' mod ''N''}}, where ''r'' is a random integer between 1 and ''N'' and [[relatively prime]] to ''N'' (i.e. {{nowrap|1=gcd(''r'', ''N'') = 1)}}, ''x'' is the plaintext, ''e'' is the public RSA exponent and ''N'' is the RSA modulus.  As usual, the decryption function {{nowrap|1=''f''(''z'') = ''z<sup>d</sup>'' mod ''N''}} is applied thus giving {{nowrap|1=''f''(''E''(''x'')) = ''(xr)<sup>ed</sup>'' mod ''N'' =  ''xr'' mod ''N''}}. Finally it is unblinded using the function {{nowrap|1=''D''(''z'') = ''zr''<sup>−1</sup> mod ''N''}}. Multiplying {{nowrap|''xr'' mod ''N''}} by {{nowrap|''r<sup>−1</sup>'' mod ''N''}} yields {{nowrap|''x''}}, as desired. When decrypting in this manner, an adversary who is able to measure time taken by this operation would not be able to make use of this information (by applying timing attacks RSA is known to be vulnerable to) as she does not know the constant ''r'' and hence has no knowledge of the real input fed to the RSA primitives.


== Examples ==
*[http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=93a96e3c0c33370248f6570d8285c4e811d305d4 Blinding in GPG 1.x]
* [http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=93a96e3c0c33370248f6570d8285c4e811d305d4 Blinding in GPG 1.x]


== References ==
== References ==
Line 25: Line 19:


==External links==
==External links==
* [http://www.cryptography.com/resources/whitepapers/TimingAttacks.pdf Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS and Other Systems]
* [http://eprint.iacr.org/2015/368 Breaking the Rabin-Williams digital signature system implementation in the Crypto++ library]
* [http://eprint.iacr.org/2015/368 Breaking the Rabin-Williams digital signature system implementation in the Crypto++ library]


{{DEFAULTSORT:Blinding (Cryptography)}}
{{DEFAULTSORT:Blinding (Cryptography)}}
[[Category:Cryptography]]
[[Category:Cryptography]]

Revision as of 17:55, 13 June 2025

Template:Short description In cryptography, blinding first became known in the context of blind signatures, where the message author blinds the message with a random blinding factor, the signer then signs it and the message author "unblinds" it; signer and message author are different parties.

Since the late 1990s, blinding mostly refer to countermeasures against side-channel attacks on encryption devices[1], where the random blinding and the "unblinding" happen on the encryption devices.

Blinding must be applied with care, for example Rabin–Williams signatures. If blinding is applied to the formatted message but the random value does not honor Jacobi requirements on p and q, then it could lead to private key recovery. A demonstration of the recovery can be seen in "Common Vulnerabilities and Exposures"[2] discovered by Evgeny Sidorov.

The one-time pad (OTP) is an application of blinding to the secure communication problem, by its very nature. Alice would like to send a message to Bob secretly, however all of their communication can be read by Oscar. Therefore, Alice sends the message after blinding it with a secret key or OTP that she shares with Bob. Bob reverses the blinding after receiving the message. In this example, both blinding and its reversal typically use the XOR operation.

Blinding can also be used to prevent certain side-channel attacks on asymmetric encryption schemes. Side-channel attacks allow an adversary to recover information about the input to a cryptographic operation, by measuring something other than the algorithm's result, e.g., power consumption, computation time, or radio-frequency emanations by a device. Typically these attacks depend on the attacker knowing the characteristics of the algorithm, as well as (some) inputs. In this setting, blinding serves to alter the algorithm's input into some unpredictable state. Depending on the characteristics of the blinding function, this can prevent some or all leakage of useful information. Note that security depends also on the resistance of the blinding functions themselves to side-channel attacks.

Examples

  • In RSA blinding involves computing the blinding operation E(x) = (xr)e mod N, where r is a random integer between 1 and N and relatively prime to N (i.e. gcd(r, N) = 1), x is the plaintext, e is the public RSA exponent and N is the RSA modulus. As usual, the decryption function f(z) = zd mod N is applied thus giving f(E(x)) = (xr)ed mod N = xr mod N. Finally it is unblinded using the function D(z) = zr−1 mod N. Multiplying xr mod N by r−1 mod N yields x, as desired. When decrypting in this manner, an adversary who is able to measure time taken by this operation would not be able to make use of this information (by applying timing attacks RSA is known to be vulnerable to) as she does not know the constant r and hence has no knowledge of the real input fed to the RSA primitives.

References

Template:Reflist

External links

  1. Script error: No such module "Citation/CS1".
  2. Script error: No such module "citation/CS1".