instruction
stringlengths
15
30k
There isn't a simple answer, as speed of batching depends on a number of parameters. First, the speed of the signature and the speed of the batching is largely independent. If you have two signature algorithms S1 and S2 that both permit batching technique B1, then generally they will both permit batching technique B...
There isn't a simple answer, as speed of batching depends on a number of parameters. First, the speed of the signature and the speed of the batching is largely independent. If you have two signature algorithms S1 and S2 that both permit batching technique B1, then generally they will both permit batching technique B...
There are several well-known techniques to generate pairing-friendly curves of degrees 1 to 36 on prime fields GF(p): Cocks-Pinch, MNT, Brezing-Weng, and [several others][1]. In extension fields GF(p^n), however, one is confined to supersingular curves. In characteristic 2, embedding degrees are <= 4, and in charact...
I have a use case where I need to encrypt some text in the browser using javascript. Only the encrypted text will be stored on the server. The user should then be able to take the encrypted result and decrypt it with gpg on the command line. I want to use gpg as it's easily available and the AES appears to support i...
From **FIPS 180-3** > Suppose that the length of the message, *`M`*, is *`l`* bits. Append the bit “1” to the end of the message, followed by *`k`* zero bits, where *`k`* is the smallest, non-negative solution to the equation *`l + 1 + k ≡ 448 mod 512`* . *[...]* For example, the (8-bit ASCII) message “abc” h...
The "How" is already explained well by others, but as far I can see, nobody wrote about "*What* does asymmetric encryption do?". It does **not**, as many think, magically allow two parties Alice and Bob to communicate *securely* over a public channel. Instead, it converts an authentic channel from Alice to Bob in...
The "How" is already explained well by others, but as far I can see, nobody wrote about "*What* does asymmetric encryption do?". It does **not**, as many think, magically allow two parties Alice and Bob to communicate *securely* over a public channel. Instead, it converts an *authentic* channel from Alice to Bob ...
This is more of a research question. I was wondering what types of crypto algorithms would work best on a small 4-8 bit micro controller. I recently read a paper called [Security Considerations for 802.15.4 Networks][1] and was wondering if anyone out there can think of any other papers or has knowledge about what ...
This is more of a research question. I was wondering what types of crypto algorithms would work best on a small 4-8 bit micro controller. I recently read a paper called [Security Considerations for 802.15.4 Networks][1] and was wondering if anyone out there can think of any other papers or has knowledge about what ...
Not quite on topic, but closely related: 8 bit microcontrollers with ISO 14443 "RFID" communication hardware from e.g. [Infineon][1], [NXP][2], [STM][3] (in alphabetical order), and several others, now abound. Some of these ICs cost $1 within a binary order of magnitude, when ordered in 6-decimal-figures quantities. Th...
Not quite on topic, but closely related: 8 bit microcontrollers with ISO 14443 "RFID" communication hardware from e.g. [Infineon][1], [NXP][2], [STM][3] (in alphabetical order), and several others, now abound. Some of these ICs cost $1 within a binary order of magnitude, when ordered in 6-decimal-figures quantities. Th...
I have read in Applied Cryptography that the NSA is the largest hardware buyer and the largest mathematician employer in the world. What are the odds they found feasible attacks on AES or other popular algorithms ? I guess it's obvious they will not let those research leak out as it can benefit to the US government ...
What are the odds the NSA actually cracked popular algorithms like AES?
**Public-key** encryption on microcontrollers Erik-oliver Blaß , Martina Zitterbart. ["Towards Acceptable Public-Key Encryption in Sensor Networks"][1]. 2005. ["dsPIC DSC Asymmetric Key Embedded Encryption Library"][2] an implementation of RSA, Diffie-Hellman, DSA, SHA-1, MD5. (Are such 16-bit microcontroll...
I have read in Applied Cryptography that the NSA is the largest hardware buyer and the largest mathematician employer in the world. * How can we reason about the symmetric ciphers cryptanalysis capabilities of code-breaking agencies like the NSA or GCHQ given that they have performed first class unpublished cryptog...
How can we reason about the cryptographic capabilities of code-breaking agencies like the NSA or GCHQ?
I have read in Applied Cryptography that the NSA is the largest hardware buyer and the largest mathematician employer in the world. * How can we reason about the symmetric ciphers cryptanalysis capabilities of code-breaking agencies like the NSA or GCHQ given that they have performed first class unpublished cryptog...
The Feige-Fiat-Shamir identity scheme is based on a ZKP assuming that square roots are "hard" modulo an integer of unknown factorization. The "parallel version" of this protocol includes a "sign bit" and the [wikipedia article][1] claims that the older version of the protocol leaked a bit, so the sign bit was added. ...
What is the sign bit for in Feige-Fiat-Shamir?
The original 1986 Fiat-Shamir paper can be found [here][1]. The subsequent Feige-Fiat-Shamir 1988 paper can be found [here][2], and contains the answer (Section 3): >The $S_j$ (which are witnesses to the quadratic residuosity character of the $I_j$) are effectively hidden by the difficulty of extracting square root...
The Feige-Fiat-Shamir identity scheme is based on a ZKP assuming that square roots are "hard" modulo an integer of unknown factorization. The "parallel version" of this protocol includes a "sign bit" and the [wikipedia article][1] claims that the older version of the protocol leaked a bit, so the sign bit was added. ...
The Feige-Fiat-Shamir identity scheme is based on a ZKP assuming that square roots are "hard" modulo an integer of unknown factorization. The "parallel version" of this protocol includes a "sign bit" and the [wikipedia article][1] claims that the older version of the protocol leaked a bit, so the sign bit was added. ...
The Feige-Fiat-Shamir identity scheme is based on a ZKP assuming that square roots are "hard" modulo an integer of unknown factorization. The "parallel version" of this protocol includes a "sign bit" and the [wikipedia article][1] claims that the older version of the protocol leaked a bit, so the sign bit was added. ...
I'm currently reading [Cryptography Engineering][1]. After giving a high level explanation of the difference between secret-key encryption and public-key encryption, the book says: > So why do we bother with secret-key encryption if public-key encryption is so much easier? Because public-key encryption is much less ...
Why is public-key encryption so much less efficient than secret-key encryption?
I'm planning to encrypt some individual files for storage, using the GnuPG implementation of RSA. If I happened to encrypt the private key corresponding to the public key used for encrypting -- either as an internal GnuPG file or an ASCII-armored exported key -- would this pose a vulnerability? The key in question i...
Would RSA-encrypting a private key for itself pose a vulnerability?
There are three efficiency issues to discuss here: CPU, network bandwidth, and functionalities. The "moral" reason of public key encryption being slower than private key encryption is that it must realize a qualitatively harder feature: to be able to publish the encryption key without revealing the decryption key. T...
I'm planning to encrypt some individual files for storage, using the GnuPG implementation of RSA. If I happened to encrypt the private key corresponding to the public key used for encrypting -- either as an internal GnuPG file or an ASCII-armored exported key -- would this constitute a vulnerability? The key in ques...
Would RSA-encrypting a private key for itself constitute a vulnerability?
If there is a vulnerability in encrypting a RSA private key with the corresponding public key, when the private key is password-protected, then it mechanically implies a vulnerability in the password-based protection scheme: if an attacker gets a copy of the password-encrypted key (without the password), he can encrypt...
The main difficulty with the one-time pad is that it requires pre-arrangement. In order for me to use a one-time pad to communicate with you, we must either have arranged ahead of time for a one-time pad that we will use (which must be as large as our communication will be), or else we must have some secure way of comm...
RSA, DES, AES, etc. all use (relatively) complicated mathematics to encrypt some message with some key. For each of these methods, there have been several documented vulnerabilities found over the years. Some even believe that there is a vulnerability in AES known only to the NSA. On the other hand, the One-time pad...
Is modern encryption needlessly complicated?
There is a very easy reason why one-time pads are not always used. It requires information sent before the encryption is set up, i.e. both the sender and the recipient need to have access to the pads themselves. That's a big pain, especially if all information was to be sent with one time pads. How would one distribute...
For symmetric encryption algorithms, your question is basically "Why do we use AES or DES rather than another function that provides the same properties as AES or DES but forces us to use the second weakest chaining mode and never lets us use the same key twice?" Well, the answer is obvious, we sometimes want strong ch...
There is a theorem in cryptography that states that secure encryption and secure PRNG are equivalent, and in fact you just proved half of it. Given a secure PRNG, you can create a secure encryption algorithm using the method you just provided *(using the password as the PRNG-seed)*. The other half is that given a s...
A mathematician studying cryptography would be truly dumbfounded by this question. You're completely ignoring the key-distribution problem and authentication-identity problems, both of which use public-key cryptography such as RSA. Finding a large random source for a truly-secure OTP is tremendously difficult. Yo...
Does there exist any cryptographic algorithm which encrypts data in such a way that it can only be decrypted after a certain period of time? The only idea that I can think of is something like this: Seed a PRNG with a public value. Run the PRNG for a week and use the final value it produces to encrypt the message. Now ...
Time Capsule cryptography?
In some text I am reading, there is an exercise asking to show that KeeLoq decryption function is the inverse of the encryption function. For the details about KeeLoq, there is a reference to this wikipedia article: http://en.wikipedia.org/wiki/KeeLoq As I am no hardware guy, I have no clue how to approach this prob...
In some text I am reading, there is an exercise asking to show that KeeLoq decryption function is the inverse of the encryption function. Details about KeeLoq are given in [the Wikipedia article][1]. As I am no hardware guy, I have no clue how to approach this problem. Does someone happen to see, how to show the req...
I'm trying to create a `ISO8583 Rev93` message. What is the standard way of generating MAC key in ANSI X9.9 DES-CBC encryption algorithm is used to encrypt the message and generate the MAC. - How many bytes should I take from the encrypted byte array based on ANSI X9.9 standard? 8 or 16? I think I should take...
I know it uses RSA/DSA to create keys, but does it use that same algorithm for the actual cipher?
What algorithm does PGP use to encrypt email?
I was reading the <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">wikipedia article</a> on the public-key cryptosystem "NTRU", and while it had lots of interesting properties (being resistant to quantum computer attacks, being standardized by several important bodies), one of the claims in the article struck me as p...
Does NTRU decrypt correctly now?
My application can authenticate via openid and oauth (facebook, twitter, etc) and also with its own authentication system. I previously switched hashing from MD5 to SHA1 and during migration I had to customize so that accounts could verify both with MD5 and SHA1 and now I've removed the MD5 completely. I read here ...
SHA1 usage for passwords, alternatives and advantages?
My application can authenticate via openid and oauth (facebook, twitter, etc) and also with its own authentication system. I previously switched hashing from MD5 to SHA1 and during migration I had to customize so that accounts could verify both with MD5 and SHA1 and now I've removed the MD5 completely. I read here ...
Craig Gentry recently gave the first fully homomorphic cryptosystem. Quite a bit of work has been done since extending his work. It seems, however, that no system is practical for real world use. What are the current roadblocks making FHE impractical? Which proposed system would you say is currently the most practical?
I was reading the <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">wikipedia article</a> on the public-key cryptosystem "NTRU", and while it had lots of interesting properties (being resistant to quantum computer attacks, being standardized by several important bodies), one of the claims in the article struck me as p...
The short answer You can find some useful information at the following questions: * [What Partial Homomorphic Encryption implementations exist and how do I leverage them?](http://security.stackexchange.com/q/3893/971) discusses some schemes that fall short of being fully homomorphic but are more practical and are...
**Bottom line.** The short answer is that none of them are practical ... yet. But there is a lot of active research, and if we're lucky, maybe that will lead to enough improvements that it might become practical. We'll see. **More information.** You can find some useful information at the following questions: *...
Regarding your question about choice of password hashing algorithms, this has been covered well on this site. See the following posts for excellent advice: * [How to securely hash passwords?](http://security.stackexchange.com/q/211/971) * [Thomas Pornin's answer to a related question](http://security.stackexchan...
I was reading the <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">wikipedia article</a> on the public-key cryptosystem "NTRU", and while it had lots of interesting properties (being resistant to quantum computer attacks, being standardized by several important bodies), one of the properties of NTRU struck me as pret...
I was reading the <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">wikipedia article</a> on the public-key cryptosystem "NTRU", and while it had lots of interesting properties (being resistant to quantum computer attacks, being standardized by several important bodies), one of the claims in the article struck me as p...
The <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">NTRU</a> public-key cryptosystem has a lot of interesting properties (being resistant to quantum computer attacks, being standardized by several important bodies), but it also has a pretty unique property: > The decryption algorithm does not always work. Sometime...
Last time I asked a question of this type on math.se it was redirected here, so I hope this one is also appropriatete for crypto.se. I stumbled uppon this question in some textbook. *Propose a variant of ElGamal signature scheme such that there is no need to calculate the inverse $k^{-1}$ as it is usually done ...
What is the exact purpose of the (**dt**) date/time vector in the ANSI X9.31 PRNG (http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf) ? The seed and key must be kept secret but the **dt** can be know to the adversary!?
ANSI X9.31: the purpose of the date/tiem vector in the prng?
What is the exact purpose of the $dt$) date/time vector in [ANSI X9.31 PRNG][1]? Specifically, the document seems to imply that the seed and key must be kept secret but makes no claims on the secrecy of the $dt$ vector. Can it be known by an adversary? Are there any implications if it is known to an adversary? ...
ANSI X9.31: the purpose of the date/time vector in the prng?
What is the exact purpose of the date/time vector $dt$ in the [ANSI X9.31 PRNG][1]? $$ I := E_K(dt) $$ $$ R := E_K(I \oplus V_{old}) $$ $$ V_{new} := E_K(R \oplus I) $$ Specifically, the document seems to imply that the seed $V_*$ and key $K$ must be kept secret, but makes no claims on the secrecy of the $dt...
ANSI X9.31: the purpose of the date/time vector in the PRNG?
For the Diffie-Hellman protocol, I've heard that the generator 3 is as safe as any other. On the other hand other people have used 32-bit or 256-bit exponents. What is the benefit of using a very large generator if 3 is really that safe? If 3 is for some reason not the safest, how can I calculate the shortest leng...
Does the generator size matter in Diffie-Hellman?
As described in Facebook's documentation, https://developers.facebook.com/docs/oauth2-https-migration/, the access tokens given to apps are now encrypted. I don't understand why Facebook did this. Encrypted or not, if someone gets their hands on the token, they can use it to access Facebook APIs as the user who granted...
What advantage does facebook's new encrypted access_token have?
This question is related to ElGamal signature scheme as defined here http://crypto.stackexchange.com/questions/630/elgamal-signature-without-calculating-the-inverse Show how one could exploit an implementation ElGamal signature scheme in which it is not checked that $0 \leq \gamma \leq p-1.$ As far as I can see...
When a user on facebook grants an app access to their account, an API key is issued to the app. This key is app and user-specific. This process is described in Facebook's [developer documentation](https://developers.facebook.com/docs/authentication/). Until recently, API keys could be parsed- they contained the app'...
I am aware of the vulnerabilities of simple xor ciphers and recently I came across a block cipher that claims to solve those vulnerabilities. The cipher goes as follows with both the block and key sizes at 256-bits. The key is separated into chunks of length 1 bit. Every bit in the plaintext is xored with every ...
I was studying DSS from "Cryptography and Network Security" by William Stallings. What puzzled me was the DSS approach figure described in the text. It says it uses Public and Private Keys for creating signature. ![enter image description here][1] But the algorithm for creating signature in DSA doesn't use it. ...
Unless you are badly (and I mean truly badly) misrepresenting the idea, it is one of the worse ideas I've seen in crypto in quite some time. The first bit is effectively exclusive or'ed with the parity of the key; the ciphertext bit will be either the plaintext bit (if the key has an even number of '1' bits) or the ...
It depends how you define what a "public key" is. Typically it is the value of the key itself ($y$), plus information about the group (safe prime $p$, subgroup size $q$, generator of subgroup $g$). For signing a message, you do not need the value of the public key itself. So if you are strict in defining a "public ...
I was studying DSS from "Cryptography and Network Security" by William Stallings. What puzzled me was the DSS approach figure described in the text. It says it uses Public and Private Keys for creating signature. ![enter image description here][1] But the algorithm for creating signature in DSA doesn't use it. ...
I have elliptic curve cryptography for my "cryptography and network security" course. The text books gives a strict theoretical definition of that. I think people here could give a good explanation, that could even be understood by a small complete beginner. Looking for an [ELI5][1] explanation [1]: http://www.u...
I recommend that you start by reading [the description of elliptic curve cryptography in Wikipedia](https://secure.wikimedia.org/wikipedia/en/wiki/Elliptic_curve_cryptography), and then let us know what you'd like to know: What didn't you understand? What didn't it cover that you'd like to know about? The one-sente...
I have been studying Elliptic Curve Cryptography as part of a course based on the book [Cryptography and Network Security][1]. The text for provides an excellent theoretical definition of the algorithm but I'm having a hard time understanding all of the theory involved in ECC. I'm looking for an explanation suitable...
Basic explanation of Elliptic Curve Cryptography?
I would like to generate a 256-bit HMAC on a microcontroller that has a 128-bit (only) AES engine. How can I construct a 256-bit hash function from a 128-bit cipher?
How do I construct a 256-bit hash function from 128-bit AES?
[HMAC][1] is a specific construction which aims at providing a [message authentication code][2]. HMAC is defined over a hash function, something which AES is not. So if your question is really about having HMAC, not just any MAC, and using an AES primitive, then your question becomes: how can we build a hash functio...
Are you sure you need an HMAC (Hash based MAC)? [CBC-MAC](http://en.wikipedia.org/wiki/CBC-MAC) is probably a better construction for a keyed message authentication code using a block cipher. To get 256-bits, use two separate keys and compute 2 different MACs and concatenate them together. If your AES engine is rea...
Are you sure you need an HMAC (Hash based MAC)? [CBC-MAC](http://en.wikipedia.org/wiki/CBC-MAC) is probably a better construction for a keyed message authentication code using a block cipher. To get 256-bits, use two separate keys and compute 2 different MACs and concatenate them together. If your AES engine is rea...
I have a truecrypt container which I want to synchronise between computers (i.e. different people, that I want to share the data with). If I used [Dropbox](http://www.dropbox.com) for synchronisation and someone downloaded all the different versions of a publicly accessible truecrypt container over time, whenever it g...
Is changing public truecrypt container secure?
I have a [Truecrypt][1] container which I want to synchronise between computers (i.e. different people, that I want to share the data with). If I used [Dropbox](http://www.dropbox.com) for synchronisation and someone downloaded all the different versions of a publicly accessible Truecrypt container over time, whenev...
The truecrypt folks seem to have done a pretty good job with their crypto, so I'm going to say the answer is no, it would not get easier for them to find the password for any practical sense of the word "easier". They even have a write up on [Sharing over Network][1] which seems pertinent. Typically in a cryptanalyt...
I would like to generate a 256-bit hash on a microcontroller that has a 128-bit (only) AES engine. How can I construct a 256-bit hash function from a 128-bit cipher?
I'm looking for information on the MJH double-block-length hash function, but the best free source I could find is the diagram near the end of http://www.ecrypt.eu.org/hash2011/proceedings/hash2011_06.pdf Is source code available for this function? What are the standard symbols used (m, V, Z) when describing hash fu...
How is the MJH double-block-length hash function constructed?
It looks like you've changed your question. Anyway, as to the new question (about how to build a 256-bit hash function out of 128-bit AES), the simple answer is: you don't. Don't do that. There's no really good, well-vetted way to build a 256-bit cryptographic hash function out of AES. Instead, if you need a 256-bi...
I'm looking for information on the MJH double-block-length hash function, but the best free source I could find is the diagram on page 18 of [Efficient hashing using the AES Instruction Set][1] (submitted to the ECRYPT II Hash Workshop 2011). Is source code available for this function? What are the standard symbols ...
Consider the situation of a nation state (Blue) at war with another nation state (Red). Blue wants to deploy a secure cipher that blue currently can not break, but they are considered that Red could reverse engineer the cipher and use it to secure Red's communication (Red is unable to develop it's own secure cipher). ...
Could one construct a cipher that is secure to friendly parties but insecurely to hostile parties?
The design of DES might give some insight into the problem. The NSA altered the S-box of DES. Many people thought they planted a backdoor. It wasn't until later that differential cryptanalysis was independently discovered by Biham and Shamir that people realized that the NSA actually made DES stronger. So the lesson...
Could one construct a cipher that is secure to friendly parties but insecure to hostile parties?
Consider the situation of a nation state (Blue) at war with another nation state (Red). Blue wants to deploy a secure cipher that blue currently can not break, but they are considered that Red could reverse engineer the cipher and use it to secure Red's communication (Red is unable to develop it's own secure cipher). ...
Could one construct a cipher that is secure for friendly parties to use but insecure for hostile parties?