All Questions
29,831
questions
10
votes
3
answers
7k
views
How to generate a list of unique random strings?
How would you generate a list of distinct random strings, where all strings are alphanumeric and have a fixed length?
6
votes
2
answers
4k
views
Is it a good idea to use bitwise XOR on a set of MD5 sums?
I have designed an SQL aggregate function in Oracle that bitwise XORs all MD5 sums of the values stored in a column.
For example, if my table is:
...
2
votes
1
answer
2k
views
Hash or encryption function for challenge-response protocol?
Say I have an authentication protocol where the shared secret is never transmitted. The server passes a challenge to the client and the client calculates a response using an algorithm where the ...
9
votes
5
answers
3k
views
Software implementation of a commutative cipher?
I've got an application (detailed below) that calls for the use of a cipher that is commutative. I've been doing some googling & reading, and there are two algorithms that seem to get mentioned ...
13
votes
1
answer
5k
views
Are there any specific requirements for the function $F$ in a Feistel cipher?
In a Feistel cipher (as shown below), it seems that the security of the cipher would be entirely dependent upon the function $F$. What requirements on $F$ are necessary for a secure Feistel cipher? Is ...
4
votes
2
answers
12k
views
How to distribute session keys in public key cryptography?
In public key cryptography we can also use session keys which are symmetric. How do the sender (say a server) provides this session key information to its clients?
If the sender (here server) ...
33
votes
2
answers
17k
views
Why is MixColumns omitted from the last round of AES?
All rounds of AES (and Rijndael) have a MixColumns step, save the last round which omits it. DES has a similar feature where the last round differs slightly. The rationale, if I recall correctly, ...
6
votes
2
answers
332
views
Where is the proof of security of Diffie's cipher?
There is an apparently provably secure cipher that was proposed by Diffie, but enhanced by R.A. Rueppel. The scheme, which was mentioned in Applied Cryptography, works like this:
Measure the length ...
4
votes
1
answer
131
views
Is there any serious discussion about using blinding intermediaries in digital currency scenarios?
A digital currency system like Lucre (OpenTransaction) creates a coin by a mint blind signing the output of a hash function, which the payer then unblinds and pairs with the input to the has function.
...
12
votes
2
answers
4k
views
How can I make my cipher show the avalanche effect?
I am a beginner in cryptography. I designed an password based encryption-decryption algorithm, which uses a random salt and a password to encrypt a message. I'm using SHA-512 for hashing, matrix ...
14
votes
3
answers
2k
views
Can one claim that AES is a perfect cipher?
I'm taking a crypto class this semester and after learning the definition of a perfect cipher. I started wondering how this definition applies to AES.
Obviously AES isn't a perfect cipher, since the ...
7
votes
1
answer
4k
views
How can one show that an ElGamal-like signature verification scheme is valid?
For an ElGamal-like signature scheme, I am given two things:
The signing function,
the verification function.
How can I show that the verification function is valid?
Example 1:
Signing: $s := x^{-...
3
votes
1
answer
1k
views
ElGamal message signatures retrieving the secret value x
If the GCD(r, p-1) is small and the value k is used to sign a message using ElGamal is also small. Then the secret value of x can be determined.
Why is this true? How would one retrieve x?
3
votes
1
answer
2k
views
Verilog simulation of Data Encryption Standard [closed]
I am interested in developing DES (in verilog) for my college project. Can I get help in understanding the simulation results of DES encryption and decryption?
7
votes
2
answers
1k
views
How does the wider cryptographic community view non-abelian group based cryptography?
Is there perhaps some neural expository article on crypto systems based on non-abelian groups?
I've gleaned that Anshel–Anshel–Goldfeld key exchange is the most well-known cryptographic algorithm ...
8
votes
7
answers
7k
views
Is a book cipher provably secure?
I've seen ciphers (usually in spy drama shows) that involve taking a book and writing down an index to individual characters. Essentially it's a keyed substitution cipher, where the key is the name ...
12
votes
3
answers
3k
views
Using a Non-Random IV with modes other than CBC
The weakness CWE-329 is an interesting problem with CBC mode. However, does this same weakness affect the other modes of operation that rely upon an IV such as: PCBC, CFB and OFB? My gut feeling is, ...
4
votes
3
answers
12k
views
How can I create a fixed length output in my hash function?
I've been recently looking into the creation (and theory) of hash functions, however I just can't figure out how to turn a message into something of a fixed length.
At the moment, my theory of a hash ...
23
votes
5
answers
9k
views
Desirable S-box properties
What desirable properties should an S-box have?
My current standard selection process is to just pick them at random and verify that they fit the following criteria:
The probability that any random ...
15
votes
3
answers
5k
views
Security of simple xor and s-box cipher?
What weaknesses (or strengths) do block ciphers based on only key xor and s-box have when operating in CBC mode?
A cipher's internal primitive might be a simple as this:
$C = S[M \oplus k]$, where $...
1
vote
3
answers
2k
views
Does knowing common prefixes help crack blowfish?
I have strings that are if the form:
{static data}{changing data}
The beginning static data part is around 20 characters and is common to all strings. The last ...
6
votes
1
answer
2k
views
Message space in security definitions
What is the message space in the following example and how does a message space relate to a security definition?
I mean, what difference does it make to such a definition if your message space is $\{...
7
votes
1
answer
4k
views
Example of CHI Square test on Caesar Cipher?
I am trying to get my head round the chi square test, when used with the Caesar cipher.
I started off using this formula,
$$ X = \sum_{i = 1}^k \frac{f_i · f'_i}{n · n'} $$
Where $...
5
votes
2
answers
1k
views
Is a RSA-signature of some identifying data a safe way to implement a license key?
I have this idea of implementing a license key:
After the user downloads the program, he connects to a website and sends his Windows product ID.
The website, then, sends this back to him with a ...
4
votes
4
answers
2k
views
A mathematical explanation of the DES encryption system
I need a mathematical explanation of what does the DES encryption system really do.
This means I need more explanation than the one that offers FIPS, which is more an explanation for computer ...
3
votes
2
answers
2k
views
Can you help with that definition for a CCA?
The following is a definition taken from Introduction to Modern Cryptography by Katz and Lindell.
I'm having a hard time understanding some basic concepts! Can you please help me?
$\newcommand{\Gen}{\...
6
votes
1
answer
664
views
What are the consequences of a MAC tag collision?
I've seen some proofs of MAC security that are based on the extremely-unlikely event that two MAC tags collide (ie, they are equal for distinct messages). Suppose that this extremely unlikely event ...
5
votes
3
answers
829
views
Derived Shared Key vs Distinct Keys?
I've seen a lot of 2-party applications that derive a shared key from distinct keys created by each party.
Why is this technique employed? Would it not be better to use those two distinct keys for ...
29
votes
2
answers
32k
views
How does a chosen ciphertext attack work, with a simple example?
Can someone please explain - using a simple example - how a chosen ciphertext attack works?
0
votes
3
answers
2k
views
Encryption technique performance evaluation
I've come up with a light weight bit wise encryption algorithm and seems good. Ive tried it with text and image input. But I've the following questions I would like to ask
What do you think of bit ...
10
votes
1
answer
2k
views
Advanced Access Content System (AACS) and Subset Difference techniques for Broadcast Encryption
I'm trying to get a grasp on AACS and Subset Difference (archived version with images) for a project I'm working on and am having a hard time coming up with a technically valid layman explanation, let ...
5
votes
1
answer
1k
views
Must the order of the groups in a bilinear map be the same?
I've been reading up on bilinear maps and their application to cryptography and one thing I keep seeing hasn't yet clicked.
If $e:G_1\times G_2\to G_n$ is a bilinear map, $G_1,G_2,G_n$ are always ...
14
votes
1
answer
16k
views
RSA-PSS salt size
One of the inputs of RSA-PSS signing and verification is the salt size. According to PKCS#1, you must know the salt size before the verification is carried out. However, this makes interoperability ...
8
votes
1
answer
4k
views
What is the proper way to use a client nonce?
I've implemented an API for one of my clients, it relies on nonces and a shared secret. The structure:
Client's Site (CS) requests nonce from My App (MA), posting their username
MA verifies the ...
9
votes
2
answers
2k
views
Random Coin Flip using ElGamal and a Trusted Party
An old exam question I am trying to figure out:
Consider the following protocol for two parties to flip a fair coin.
Trusted party T publishes her public key pk
A chooses a random bit $...
178
votes
4
answers
127k
views
Why is elliptic curve cryptography not widely used, compared to RSA?
I recently ran across elliptic curve crypto-systems:
An Introduction to the Theory of Elliptic Curves (Brown University)
Elliptic Curve Cryptography (Wikipedia)
Performance analysis of identity ...
24
votes
2
answers
5k
views
Is H(k||length||x) a secure MAC construction?
If $H$ is a typical secure hash function, then $(k,x) \mapsto H(k \mathbin\| x)$ is not a secure MAC construction, because given a known plaintext $x_1$ and its MAC $m_1$, an attacker can extend $k \...
24
votes
3
answers
20k
views
Are there practical upper limits of RSA key lengths?
Suppose one wanted to use RSA encryption for the sole purpose of sending key bits for use in symmetric crypto systems, a dedicated key exchange system so to speak.
And say you didn't think that the ...
5
votes
3
answers
507
views
Cipher for Product Registration?
I'd like to implement a "Product Registration" scheme into my software where upon initial use, the User must enter a key to unlock it.
The key they enter is compared to their encrypted Username.
...
7
votes
2
answers
1k
views
For public-key encryption, why does COA resistance imply CPA resistance?
My professor told me:
If a public-key crypto-system is secure against ciphertext-only attacks,
then it is also secure against a chosen-plaintext attack.
Why is this true? Is there a proof that ...
41
votes
3
answers
49k
views
What are preimage resistance and collision resistance, and how can the lack thereof be exploited?
What is "preimage resistance", and how can the lack thereof be exploited?
How is this different from collision resistance, and are there any known preimage attacks that would be considered feasible?
42
votes
4
answers
41k
views
Best way to reduce chance of hash collisions: Multiple hashes, or larger hash?
I would like to maintain a list of unique data blocks (up to 1MiB in size), using the SHA-256 hash of the block as the key in the index. Obviously there is a chance of hash collisions, so what is the ...
10
votes
1
answer
4k
views
Linear Cryptanalysis
What is the principle of linear cryptanalysis, as applied to a block cipher ? For instance, this page gives the rough outline of differential cryptanalysis.
9
votes
1
answer
18k
views
Avalanche effect in DES
I couldn't understand the avalanche effect in DES. Could someone explain how avalanche effect happens in DES
2
votes
3
answers
2k
views
How does one provide a secure and authentic communication channel?
Let assume two participants Alice and Bob who perform a given protocol which is a sequence of messages exchange between them.
My question is: How can I provide a secure and authentic communication ...
14
votes
3
answers
3k
views
Is it reasonable to assure that p-1 and q-1 aren't smooth?
I came across the requirement that, in RSA, $p-1$ and $q-1$ shouldn't be smooth, shouldn't consist of lots of small factors. Therefore my question:
How complicated is it to check whether $p-1$ is ...
12
votes
2
answers
8k
views
Encrypting and obscuring data between site/user without SSL
Im trying to figure out what the best way to encrypt data sent between a webpage and the user(both ways) is, when hosted in an environment that doesn't support SSL. The purpose of encryption would be ...
229
votes
8
answers
109k
views
How much would it cost in U.S. dollars to brute-force a 256-bit key in a year?
I am often told that any key can be broken and that it is only a matter of time and resources for any key to be broken. I know that this is technically true. However, I think that there is probably a ...
6
votes
1
answer
3k
views
Encrypting (CBC) identical files with same key and different IV, is it less secure?
I would like to learn more about cryptography.
Let's say you encrypt multiple files with CBC encryption using the same key, but each file has a unique (and pseudorandom) IV. Does this weaken the ...
7
votes
2
answers
5k
views
How key materials are generated in SSL V3 from master secret
The generation of key materials is given by
...