# All Questions

1answer
313 views

### Why does Merkle's Puzzle requires Eve quadratic complexity of effort to break the system?

The way Applied cryptography 2ED explains the puzzle is as follows (I paraphrase it): Bob generates 2^20 messages of the form x,y where ...
2answers
270 views

### What is the limit of plaintext required to break the Vigenère encryption?

A theoretical question about the Vigenère cipher: Without any knowledge about the key (not even it's length) can we tell how much known or chosen plaintext is needed for the adversary to completely ...
1answer
149 views

### How does SSL secure the initial handshake?

I'm reading the SSL specs, and it seems that the initial handshake has no authenticity protection at all. What is to prevent, say, an attacker from overwriting the "available ciphers" list with one ...
1answer
803 views

### What's the difference between the long term key and the session keys?

I'm currently studying secret key cryptography, and I've come across the terms "long-term key" and "session key". What's the difference between these two kinds of keys?
2answers
250 views

### Are there attacks that break collision resistance but not preimage resistance?

Are there any examples of attacks on hash functions which: break collision resistance and second preimage resistant, or break collision resistance and preimage resistant? I have looked at ...
3answers
348 views

### OFB or CTR mode without an IV

I'm reading the SSL specs here. The interesting thing seems to be that RC4 is not re-keyed with a new IV for each message. The stream cipher state is simply carried over to the next record. Why is ...
1answer
330 views

### How can I prove/disprove that a construction yields a secure PRG?

Let $G:\{0,1\}^{*} \mapsto \{0,1\}^{*}$ be a secure PRG. Prove or disprove that the following construction also yields a secure PRG. $$G'(k) = G(k||0),$$ where $||$ denotes the concatenation of two ...
1answer
741 views

### Subtracting a point in elliptic curve cryptography?

I've had lots of practice adding points for my crypto class. However I've run into a situation where I need to subtract two points for decryption: ...
1answer
331 views

### With TLS and ECDHE, how does curve selection work?

Given that a TLS client and server have already agreed upon ECDHE for session key establishment, how does the selection of the actual elliptic curve ("domain parameters") being used for deriving the ...
2answers
4k views

### With OpenSSL and ECDHE, how to show the actual curve being used?

Using openssl s_client -host myserver.net -port 443 I can see the cipher negotiated is indeed using ECDHE for session key ...
1answer
914 views

### What is wrong with AES-CTR-HMAC-SHA256 - or why is it not in TLS?

It seems the only specified CTR mode ciphers in TLS are all GCM based. GCM ciphers run AES-CTR and do authenticated encryption with a MAC based on Galois-field ...
3answers
495 views

### Some cryptography security questions

I recently had a discussion with a friend of mine about cryptography. As we are both no experts, I thought that I could better resolve are dispute here :-). My friend said that when he used public ...
3answers
572 views

### Timing Attacks on ECDSA, ECDHE, AES and SHA2

Are there any known timing attacks (both practical and theoretical) on any implementations of the following? ECDSA (I'm aware of this one - are there any applicable to prime fields?), ECDHE (again, ...
2answers
122 views

### The weak link is the password?

Consider a secure modern block cipher like AES/Serpent/Twofish. I hear everyone say that the complexity is $2^{128}$ for a 128 block cipher. But isn't the weak link the actual hashed and salted ...
1answer
4k views

### HMAC SHA256 vs RSA SHA256 - which one to use

Salesforce recently announced they are moving away from HMAC SHA256 to RSA SHA256. Why did they make that move?. Any technical factors? Is HMAC really easy to break? ...
1answer
105 views

### How do I know if a given curve requires a FpCurve F2mCurve or ECCCurve?

I'm trying to read a public key into Bouncy Castle (secp256k1) and need to choose from the following objects FpPoint; FpCurve; or ...
1answer
1k views

### RSA with modulus product of many primes

I would like to ask what happens if we build an RSA system with modulus a product of more than 2 primes, for example let $n=p_{1}p_{2}...p_{L}$. I know only the classical RSA system with $n=pq$ with ...
1answer
133 views

### How do you use the Tiger hash function with GPG?

I've searched Google and the GnuPG documentation and I haven't been able to find an answer. Some pointers in the right direction would be greatly appreciated.
2answers
347 views

### What does the linear assumption over bilinear groups mean?

In the abstract of "Cryptography with Tamperable and Leaky Memory", at the end of the 3rd paragraph, the authors say: In both schemes we rely on the linear assumption over bilinear groups. What ...
4answers
617 views

### Do any non-US ciphers exist?

Plenty of ciphers come out of the USA from government research or selection competitions. AES and DES are examples. Are there any public ciphers produced by other states, China or Iran for example? ...
1answer
3k views

### Can AES use PKCS#5 padding

From What is the difference between PKCS#5 padding and PKCS#7 padding, I understand that PKCS#5 is defined for 8 byte block sizes. Does this rule it out as a padding option for AES since AES has a ...
2answers
109 views

### Is it possible to decide the base of a discrete logarithm?

Given $R$, a prime $p$ and two bases $g_1$ and $g_2$, is it possible to decide if $R = g_1^r$ mod $p$ or $R = g_2^r$ mod $p$ without knowing $r$?
2answers
220 views

### Hypothetical unknown cipher - security in obscurity?

I'm curious what would happen in the following scenario: Suppose an attacker gets a hold of a cipher-text of sufficiently large length. And suppose he has the means to verify a successful decryption. ...
1answer
201 views

### Can keys from Bitcoin's Hierarchical Deterministic Wallets be correlated (reducing privacy)?

I'm trying to understand if the feature "Hierarchical Deterministic Wallets" in Bitcoin allows for complete privacy of all derived keys, and if any of those keys can be associated with each other ...
2answers
411 views

### Which crypto libraries/programs do we have the most confidence in? [closed]

I have recently begun studying crypto. If it's one thing I have learned it's that we should not implement our own crypto. Therefore we should look to using existing software and libraries. When I ...
2answers
188 views

### Can you get two unpredictable hashes from the same message with, e.g. SHA1?

I'd like to create a database of questions and answers so that an attacker with access to the database can't obtain either the questions or the answers. If H0 and ...
2answers
1k views

### Why is sharing the seed and using SecureRandom “deterministically” so bad?

I've recently been reading an article about "using cryptography to store credentials", and I would love it someone explained this in more detail… Up until Android 4.1, Android used a SecureRandom ...
1answer
177 views

### Good Encryption Exponent

I have placed a bet that I can create a public key such that my adversary will not be able to crack (decrypt) it for at least one week. For my primes $p$ and $q$, I chose very large numbers that are ...
2answers
107 views

### Password as it relates to various encryption schemes

Suppose you have 2 drives you want to encrypt using different encryption algorithms, as an example: AES256 and Twofish. I am aware that using the same password for both could potentially weaken ...
1answer
1k views

### Knowing pre-encryption data, can we find the private key CryptoLocker used?

One of our users seems to have been hit by CryptoLocker. As a result, he has a hard drive full of encrypted files. The ransom-ware claims to have used public key encryption on the files. If we know ...
1answer
139 views

### How do I prove that this PRNG is easily distinguished from a random sequence of numbers (modulo m)?

I was studying Crypto, and this question came up. Using a PRG like the multiplicative congruence generator: $b_{i+1} = a \cdot b_i \mod m$ How do I prove that the output of this PRG, or any PRG's ...
1answer
174 views

### How to design a cryptographically secure file hosting service

How one would go about design something like Google Drive/Dropbox providing the following features: files are encrypted and decrypted on the client files can be synced between devices the service ...
1answer
594 views

### RSA decrypt long messages (javascript)

I am attempting to encrypty/decrypt a long message in RSA using javascript (with crypto-js and jsbn libraries). I posted this on stackoverflow too but I figured someone here on crypto might be able ...
2answers
219 views

### Isn't the deterministic property of (EC)DSA a security problem?

From what I read in Wikipedia's article "Elliptic Curve DSA ~ Security", the "deterministic" generation of $k$ can help prevent certain type of attacks (such as the one happened to Sony). However, ...
1answer
242 views

### Is there proof to the relation between the gap Diffie-Hellman problem and the the Cha-Cheon signature scheme?

I am trying to prove that: "If the gap Diffie-Hellman problem is easy, then the Cha-Cheon signature scheme will be broken." Can you help me to prove it? Is there any proof to the relation between ...
5answers
627 views

### Would it be possible to generate the original data from a SHA-512 checksum?

So, I have a file that is XY Exabytes big. I create a SHA-512 hash from it. Are there any theoretical chances that I can retrieve the original data just from the sha512 hash? Also, are there any ...
2answers
246 views

### Is there a companion algorithm for OTP to ensure integrity and/or authentication?

One-Time Padding is (theoretically) perfect encryption algorithm. Let's assume that these problems are solved: Fast generation of independent and identically distributed random variables Perfect key ...
1answer
203 views

### Having 4096 bit keys and short (< 256 byte) messages, can I simply use the key as OTP?

Assumptions: Alice and Bob use (cryptographically secure, hardware-rng generated) 4096 bit keys. Each message is encrypted using a new key; meaning: once a key is used, it's destroyed. Alice and Bob ...
2answers
915 views

### Open source implementations of Symmetric Searchable Encryption and Order Preserving Encryption [closed]

Are there open source implementations of SSE and OPE? Can anyone please point to sample codes, if available. EDIT If cryptDB is not an option, what other options are available? (Indeed, these ...
1answer
119 views

1answer
2k views

### Implementing OpenSSL padding

I'm conducting an experiment dealing with differences in padding across different aes operations for my Intro to Crypto class, and the question says OpenSSL uses PKCS5 padding, and that I need to ...
0answers
232 views

### Logics for Cryptographic Information Games

Preamble: There is currently a zoo of various logics for evaluating (proving) security in cryptographic protocols. The idea is that, by expressing these protocols using some logic, you can create a ...
1answer
333 views

### FHE - Brakerski's “Scale Invariant” Scheme

I thought the current state of the art for fully homomorphic encryption was Brakerski, Gentry and Vaikuntanathan's scheme (BGV) based on standard/ring LWE employing modulus switching for noise ...
1answer
203 views

### MARS and RC6 in CUDA

I am working on a project where I am benchmarking the 5 AES finalists (Rijndael, Twofish, Serpent, MARS and RC6) on CUDA Hardware. My problem is that I am no experienced CUDA programmer. My approach ...
1answer
117 views

### Genuine encryption from only one source?

Is there any technique so that if I encrypt data, the ciphertext would be genuine and if someone else tries to encrypt the same data the ciphertext could be determined as fake or just invalid? I want ...

15 30 50 per page