instruction
stringlengths
15
30k
What are _cryptographic_ reasons to choose an authenticated-encryption mode of operation (such as GCM) over a traditional encryption mode plus an independent MAC, or vice versa? Assume there is no implementation reason to pick one or the other (crypto library supports both, no backward compatibility constraints, etc).
What are _cryptographic_ reasons to choose an authenticated-encryption mode of operation (such as GCM) over a traditional encryption mode plus an independent MAC, or vice versa? Assume there is no implementation reason to pick one or the other (crypto library supports both, no backward compatibility constraints, etc...
Why choose an authenticated encryption mode instead of a separate MAC?
Does any one have, or can refer to a Known-Answer-Test (KAT) for Triple DES Keying Option 2? I have developed an implementation of 3DES Keying Option 2 in a FOSS library called TurboPower Lockbox (here: http://lockbox.seanbdurkin.id.au/ and here: https://sourceforge.net/projects/tplockbox/). I need some KAT vectors ...
Does anyone have a KAT for 3DES KO-2?
Does any one have, or can refer to a Known-Answer-Test (KAT) for [Triple DES Keying Option 2][1]? (Keying Option 2 means $C = DES_{k_1}(DES^{-1}_{k_2}(DES_{k_1}(P)))$ for encryption and $P = DES^{-1}_{k_1}(DES_{k_2}(DES^{-1}_{k_1}(C)))$ for decryption, where $k_1$ and $k_2$ are independent parts of the *key bundle*....
I'm implementing a protocol which needs a 64-bit IV for every encrypted packet. The cipher in use (AES-GCM, more or less as specified in [RFC 4106](http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf)) does not require that these IVs are *random*, only that they are *not repeated* for any given key. How...
Arguably the [PKCS standards][1] have a profit-oriented bias as they are promoted by RSA, which includes PBKDF2, and other well known standards. I'm considering the possibility that this information bias may include disinformation or omission regarding substitute algorithms that may be equally good if not better. ...
How do other, non-RSA algorithms, compare to the PKCS group of standards?
I'm looking at the SEED algorithm and would like to know if this is still in common usage. Can anyone tell me when I would need to implement this standard, either as a client or a server?
How common are SEED certificates outside of Korea? When is support required?
I'm looking at the [SEED algorithm][1] and would like to know if this is still in common usage. Can anyone tell me when I would need to implement this standard, either as a client or a server? [1]: http://en.wikipedia.org/wiki/SEED
Arguably the [PKCS suite of standards][1] have a profit-oriented bias as they are promoted by RSA and promote their algorithms over others in the form of RFCs and other means. I'm considering the possibility that this information bias may include disinformation or omission regarding substitute algorithms that may be...
How do other, non-RSA algorithms, compare to the PKCS #1 standard?
So here is my stupid quesion: PGP/GPGP can used to sign text, others use public key to verify them. Let's say, asymmetric cryptographic algorithm deal with space. Are there any algorithm that can deal with time? E.g. Sign a document at 2011-10-10 10:10:10, others can verify this document is really, truely s...
Encryption algorithm/hardware that can sign/verify natural time?
Does [the following quote][1] imply that valid encrypted data can be created and decrypted by the owner of a private key: > An asymmetric encryption scheme is considered to be broken if an > attacker can decrypt a given ciphertext, even if he can convince you > to decrypt arbitrary other ciphertexts What condit...
When is an asymmetric scheme considered broken?
Does Encrypt-then-MAC provide equal confidentiality, integrity and authenticity as other constructs such as EAX? If yes, how do I go about using it? My current understanding is: 1. E = encrypt(plaintext) 2. H = hash(E) 3. output(H || E) Is that correct?
Does [the following quote][1] imply that valid encrypted data can be created and decrypted by someone other than the owner of a private key: > An asymmetric encryption scheme is considered to be broken if an > attacker can decrypt a given ciphertext, even if he can convince you > to decrypt arbitrary other ciphert...
RSA is two algorithms, one for asymmetric encryption, the other for digital signatures. For asymmetric encryption, the main competitors of RSA would be: - The [Rabin cryptosystem][1] - [ElGamal][2] - [NTRUEncrypt][3] - [Diffie-Hellman][4] key exchange (in practice, key exchange is almost as good as asymmet...
The scrypt algorithm seems to be a prominent feature in the "CPU friendly" Bitcoin clones. I've heard claims that it's relatively slow on Windows and/or Intel compared to Linux/AMD. Is this true? By how much? Does anyone have concrete data on this? Is there a difference between 32 bit and 64 bit OS?
How well does scrypt perform on different architectures / OSes?
The [scrypt algorithm][1] seems to be a prominent feature in the "CPU friendly" Bitcoin clones for the proof-of-labor part. I've heard claims that it's relatively slow on Windows and/or Intel compared to Linux/AMD. Is this true? By how much? Does anyone have concrete data on this? Is there a difference between 32 bi...
The [scrypt algorithm][1] seems to be a prominent feature in the "CPU friendly" Bitcoin clones for the proof-of-labor part. I've heard claims that it's relatively slow on Windows and/or Intel compared to Linux/AMD. Is this true? By how much? Does anyone have concrete data on this? Is there a difference between 32 bi...
> I've heard claims that it's relatively slow on Windows and/or Intel compared to Linux/AMD. The claim that it could be Windows/Linux is a little off. It is more likely to be Intel/AMD, if anything. This will be an implementation detail based on the relative costs of processor instructions on each architecture; for ...
[Wikipedia states][1] that RSA challenge has been withdrawn. Does it mean that an efficient factoring algorithm is "just around the corner"? or are there some other reasons? Ideally if the challenge was still open people would gain better confidence in RSA. [1]: http://en.wikipedia.org/wiki/RSA_Factorin...
Why has the RSA factoring challenge been withdrawn?
[Wikipedia states][1] that RSA challenge has been withdrawn. Does it mean that an efficient factoring algorithm is "just around the corner"? or are there some other reasons? If the challenge was still open people would have even more confidence in RSA. [1]: http://en.wikipedia.org/wiki/RSA_Factoring_Cha...
RSA themselves (the company) say this in their [RSA Factoring Challenge FAQ][1]: > **Why is the RSA Factoring Challenge no longer active?** >Various cryptographic challenges — including the RSA Factoring Challenge — served in the early days of commercial cryptography to measure the state of progress in practical ...
For the sake of moving this question off of the "unanswered" list, the answer seems to be no. I spent time looking as implicit certificates are relevant to a project we are beginning to work on. SECG, which has the draft standard for ECQV, does have a future project for test implementations of their standardized pri...
For the sake of moving this question off of the "unanswered" list, the answer seems to be no. I spent time looking as implicit certificates are relevant to a project we are beginning to work on. SECG, which has the draft standard for ECQV, does have a [future project for test implementations of their standardized pr...
RIPEMD is a family of cryptographic hash functions, meaning it competes for roughly the same uses as MD5, SHA-1 & SHA-256 do. The [Wikipedia page for RIPEMD][1] seems to have some nice things to say about it: - "designed in the open academic community" - [not] "constrained by any patents" I rarely see RIPEMD u...
RIPEMD versus SHA-x, what are the main pros and cons?
RIPEMD is a family of cryptographic hash functions, meaning it competes for roughly the same uses as MD5, SHA-1 & SHA-256 do. The [Wikipedia page for RIPEMD][1] seems to have some nice things to say about it: - "designed in the open academic community" - "not [...] constrained by any patents" I rarely see RIPE...
Is it correct that increasing the iteration possibly decreases the cipher strength but increases the amount of time it would take to find the original hash values if using brute-force on a given hash? (i.e. from a compromised database)? In other words, if someone accessed user password hashes would be better to prot...
Strength of multiple hash iterations?
As the other poster rightly pointed out, it's a Playfair cipher. Even without the known plaintext, the program "playn" [here][1] will give the right text in less than a second. (you can compile it yourself, and it uses the bigram statistics of English) I ran it, and the result was (it uses some spurious X'es...)...
I'm not sure exactly what you are asking. In the scenario, there are two certificates: Romeo's FOAF certificate and Juliet's SSL certificate. However Romeo's certificate is used in two different ways: once to authenticate (over mutually authenticated SSL) and once as posted on a domain he controls. I believe your qu...
The security of Diffie-Hellman depends upon the group in which DH is used, but not upon which generator is used _for this group_. See note 3.53 (chapter 3, page 103) of the [Handbook of Applied Cryptography][1]. In more details: for DH, we use a subgroup of size $q$ of the integers modulo $p$ (a big prime) with the ...
I need to use a hash function to generate a 128-bit key for a symmetric cipher. The specific cipher is from the eStream portofolio, called Rabbit. I would like to use SHA256 to generate the key, but its output is twice the length required. I'm not sure if I can just truncate the hash to the lower 128 bits or some...
I need to use a hash function to generate a 128-bit key for a symmetric cipher. The specific cipher is from the eStream portofolio, called [Rabbit][1]. I am using the [SRP][2] protocol for authentication (a type of [EKE][3] protocol). As a result of this, both parties will calculate the same large integer value and ...
In a project that I'm currently working on, we are encrypting some data using AES with ECB mode in a database. Each piece of data being encrypted is very small, no more than 10 characters long. *Very importantly*, each entry of that database is encrypted using a different and unique key. **Would we gain any security...
Before it was *the* standard, the NSA proposed some changes to the S-boxes and didn't explain them. The explanation (which turned out to be correct when differential cryptanalysis was "rediscovered" by the non-spy community) was that if you changed a single bit of the input, every bit of output should have a 50% chance...
I don't believe that there's any way to generate the vanity hashes without iterating. In base 58, there's $\log_2(58) \approx 5.858$ bits per letter, so fixing 8 letters would need in average $58^8/2 = 2^{\log_2(58)·8}/2 \approx 2^{46}$ iterations. Note that Bitcoin addresses always start with a 1 by convention (this c...
The trouble with ECB begins when you encrypt _two_ blocks with the same key. If every slot in your system has its own key which is ever used to encrypt only one block (which means that when you _modify_ one of your pieces of data, you also use a new key), then there is no problem with ECB. If you reuse a key, if only t...
I understand the theory behind the use salts in hash functions, but when I see it implemented, the implementations always generate the salt on the fly and the salt appears to be different for every hash. * When implementing a salt for users signing into a website, doesn't the salt need to be the same at account cr...
How can a random salt for a hash function work in practice?
I want to make a system that needs to store some confident user information in a database. I intend on using OpenID for user authentication. What are the most common approaches to storing user's data securely in such a setup?
Is there any pair of 128-bit strings M and K such that AES$_K$(M) = M? If yes, how do I go about (efficiently) finding such a pair?
Does AES have any fixed-points?
I'd like to have an implementation of elliptic curve cryptography along the lines of secp256k1 which is secure until some information is published after which it is broken. One idea would be to use elliptic curves over a ring $Z_n$ where $n=pq$ or perhaps $n=pqr$ where $p$, $q$ and $r$ are primes of similar size and...
I'd like to have an implementation of elliptic curve cryptography along the lines of secp256k1 which is secure until some information is published after which it is broken. One idea would be to use elliptic curves over a ring $Z_n$ where $n=pq$ or perhaps $n=pqr$ where $p$, $q$ and $r$ are primes of similar size and...
I want to make a system that needs to store some confident user information in a database. I intend on using OpenID for user authentication. I would like encrypt the data in a way that it can only be decrypted when the user is logged in. What are the most common approaches to storing user's data securely in such a s...
How can I store confident data with OpenID?
What is the currently industry-standard algorithm used to generate large prime numbers to be used in RSA encryption? I'm aware that I can find any number of articles on the Internet that explain how the RSA algorithm works to encrypt and decrypt messages, but I can't seem to find any article that explains the algori...
How can I generate large prime numbers for RSA?
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. ...
Is there a point where increasing the complexity of an encryption algorithm will make it easier to break using a timing attack? Or is there no connection here at all?
Are more complex algorithms easier to break with timing attacks?
Even if RSA decided to cancel the [*Factoring Challenge*][1], it seems that some teams keep working on it. According to Wikipedia, [RSA-768][2] has been factored in late 2009. What are the current large integer factorization algorithms and what the mathematical principles behind them? What are the ways for improveme...
Which algorithms are used to factorize large integers?
I have heard that in enterprises it is common that the IT admin has a master passphrase that can unlock any content that an employee encrypts. It would be temping to think, that the IT admin's passphrase is encrypted with the employees passphrase, but then the IT can't change his passphrase. How does such encrypt...
PGP/GPG can used to sign text, others use public key to verify them. So one could say, that these cryptographic algorithms deal with space. Are there any algorithms that can deal with time? E.g. I sign a document at 2011-10-10 10:10:10, others can verify this document is really, truly signed at 2011-10-10 10-10-10...
Is there an algorithm or hardware that can sign/verify natural time?
In the [Diffie-Hellman key exchange][1], one of the steps involves calculating a primitive root of a prime number $p$. How would one go about doing so, considering that $p$ could be very large? Is there some sort of algorithm or equation? [1]: http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
Apparently, my question had already been asked as shown in [Trapdooring Discrete Logarithms on Elliptic Curves over Rings](http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.10.7808) My particular answer is shown to be broken in [Security of an Identity-Based Cryptosystem and the Related Reductions](http://cite...
I am working with golang's [elliptic library][1]. It implements functions on Weierstrass elliptic curves with $a=-3$. I need to make my own library that allows me to handle curves with $a=0$. I understand there are specific equations to use to optimally perform operations on different elliptic curves, which can be f...
How can I use Weierstrass curve operations with a=-3 for implementing operations for a=0?
In the [original paper introducing RSA][1], it is implied that one should first choose $d$ and then calulate $e$ from $p$, $q$, and $d$. However, I have found in other places (such as the [wikipedia article on RSA][2]) that one should first calculate $e$, and only then calclulate $d$ from it. Which of these two meth...
In RSA, do I calculate d from e or e from d?
Are there any ongoing or current practical attempts to solve instances of the discrete logarithm problem of the order of magnitude used in cryptographic applications, for example with a 256 bit modulus and 160 bit exponent? I am interested in efforts similar to the work of members of the [Mersenne Prime forum][1] and ...
Is there a safe way to uniquely identify a symmetric key? I know with asymmetric keys you typically use a hash of the public key, but I assume that using a hash of a symmetric key would reveal too much information. Would you simply have to assign a GUID to each key and ensure that those GUID/key pairs never get lost ...
I wonder if there are any publicly available cryptographic hashing algorithms with a 2048-bit output? The standard ones are "only" 512-bit (SHA512, WHIRLPOOL) or even less.
Do hashes with a 2048-bit output exist?
Is there a publicly available cryptographic hashing algorithm with 2048 bit output? The standard ones are "only" up to 512 bit ([SHA-512][1], [WHIRLPOOL][2]). 2048 bits are 256 bytes, so it would be useful for generating a full-length key for the RC-4 cipher. [1]: http://en.wikipedia.org/wiki/SHA-2 [2]:...
Is there a hash function with 2048bit output?
Is there a publicly available cryptographic hashing algorithm with 2048 bit output? The standard ones are "only" up to 512 bit ([SHA-512][1], [WHIRLPOOL][2]). (2048 bits are 256 bytes, so it would be useful for generating a full-length key for the ARC4 cipher) [1]: http://en.wikipedia.org/wiki/SHA-2 [2]...
I don't have an answer to your question beyond what emboss gave. However, I have to ask: why do you think you need to do this? If you're using RC4, well, RC4 can take a shorter key; do you really think that RC4 with a 256 bit key would be insufficient for your needs? RC4 has known weaknesses (both with the initial...
How can I encrypt + authenticate short strings into similar short ciphertexts?
First, convert the string which is to be encrypted into a sequence of bytes. [UTF-8][1] is easy enough; you may reduce the size a bit, depending on what you know on the input strings (e.g. if the strings are domain names, they are ASCII-compatible, so you need only 7 bits per character -- actually a bit less). For the ...
Does anybody know how to break monoalphbetic substitution cipher if it is applied to some pseudorandom text (for example to some surrogate key filed in a database)? Let us assume that we have only cipher text, and don't know anything about distribution of different characters appearence probabilities --> frequency an...
Does anybody know how to break monoalphbetic substitution cipher, if it is applied to some pseudorandom text (for example to some surrogate key filed in a database)? Let us assume that we have only cipher text, and don't know anything about distribution of different characters appearance probabilities, so frequency ...
How can one break a monoalphbetic substitution chipher at pseudorandom text?
Is there a deniable encryption scheme $M = E(p_1,k_1,p_2,k_2,...,p_n,k_n), p_j = D(M,k_j)$ of $n$ plaintexts $p_1,p_2,...,p_n$ and $n$ keys $k_1,k_2,...,k_n$ such that we can fix $D$ to be a known algorithm such as AES (without preprossing) and such that $|M| \not \approx \sum_{i=1}^n {|p_i|}$ (since this leaks informa...
Is there a deniable encryption scheme $M = E(p_1,k_1,p_2,k_2,...,p_n,k_n), p_j = D(M,k_j)$ of $n$ plaintexts $p_1,p_2,...,p_n$ and $n$ keys $k_1,k_2,...,k_n$ such that we can fix $D$ to be a known algorithm such as AES (without preprossessing $M$) and such that $|M| \not \approx \sum_{i=1}^n {|p_i|}$ (since this leaks ...
Is there a deniable encryption scheme $M = E(p_1,k_1,p_2,k_2,...,p_n,k_n), p_j = D(M,k_j)$ of $n$ plaintexts $p_1,p_2,...,p_n$ and $n$ keys $k_1,k_2,...,k_n$ such that we can fix $D$ to be a known algorithm such as AES (without preprossessing $M$) and such that $|M|<< \sum_{i=1}^n {|p_i|}$ (since this leaks information...
Is there a deniable encryption scheme $M = E(p_1,k_1,p_2,k_2,...,p_n,k_n), p_j = D(M,k_j)$ of $n$ plaintexts $p_1,p_2,...,p_n$ and $n$ keys $k_1,k_2,...,k_n$ such that we can fix $D$ to be a known algorithm such as AES (without preprossessing $M$) and such that $|M|<< \sum_{i=1}^n {|p_i|}$ (since this leaks information...
I decided to read the original RSA paper *A Method for Obtaining Digital Signatures and Public-Key Cryptosystem* because of a question I had about RSA (which is not the question I'm about to ask, but may be a question on here at some time) and came across something I had never seen before in any textbook description of...
Does RSA work for any message M?
Does anyone know of secret sharing schemes that allow new parties to be read in on a portion secret, preferably without all parties having to be online at the same time? The idea being that I divide a secret between N of K people at time T.At time T+1 I want to change it n of k' people. This may or may not be strict...
Does anyone know of secret sharing schemes that allow new parties to be read in on a portion secret, preferably without all parties having to be online at the same time? EDIT: I don't want to have to keep the original trusted authority around . The question is is this possible without reconstructing the original secre...
Are there any known secret sharing schemes that allow new parties to be read in on a portion secret, preferably without all parties having to be online at the same time? I don't want to have to keep the original trusted authority around. The question is, is this possible without reconstructing the original secret? ...
Is there a secret sharing scheme which allows delegation/re-sharing without reconstructing the original secret?
My understanding of hashing and encryption is rather limited. I certainly do not understand the mathematical formulas at play in these algorithms. With that said, what part do prime numbers play in cryptography? When I was in college, one of my professors told me that the fact that there is no formula to predict a p...
I currently use the following method to generate a different password on every website I have to login: password = SHA1 ( mainPassword . domainName . number ) where `.` stands for concatenation. Here are my questions: 1. Is this secure enough? I mean, if somebody knows my algorithm and one or many p...
How can I improve a password generation scheme based on a shared secret and URL?
Is there a deniable encryption scheme $M = E(p_1,k_1,p_2,k_2,...,p_n,k_n), p_j = D(M,k_j)$ of $n$ plaintexts $p_1,p_2,...,p_n$ and $n$ keys $k_1,k_2,...,k_n$, such that we can fix $D$ to be a known algorithm such as AES (without preprossessing $M$) and such that $|M| \ll \sum_{i=1}^n {|p_i|}$ (since this leaks informat...
Let the preimage resistance be defined as given a hash value h, it is hard to find any message such that hash(m)=h, and let the second preimage resistance be defined as given a message m1, it is hard to find any message m2 such that hash(m1)=hash(m2). Then if you are give a family of preimage resistance hash function H...
In page 16 of [Final report][1] of [European project IST-1999-12324(NESSIE)][2] mentioned that: The NESSIE project is also developing a new generic tool to analyze block ciphers with differential [78] and linear cryptanalysis [422]. **This tool is based on a general description language for block ciphers**. Is ...