# All Questions

137 views

### How to implement the Salsa20 hash function?

I am currently implementing Salsa20 from the specification as an exercise in learning and self-flagellation. I have Sections 1-7 passing the test examples provided. I am now stuck on Section 8, The ...
218 views

### Given infinite unencrypted and encrypted texts, can I find the algorithm?

Given an infinite amount of both unencrypted and the corresponding encrypted text, would I be able to calculate the algorithm? I am relative new to cryptography and don't know if I would be able to ...
58 views

### Full Domain hash library

I need to know if any of the well-known crypto libraries (openssl, crypto++) supports full domain hash function. If not, what library I can use?
420 views

### Is this encryption scheme perfectly secure?

Let $m = 6$, and let $\mathbb{Z}_m$ denote the set $\{0,…,m-1\}$. Let $X \mod m$ denote the remainder obtained when dividing $X$ by $m$. (a) Consider the symmetric encryption scheme in ...
252 views

### What is the period of a cipher?

For the following explanation of RC4: It is a variable key-size stream cipher with byte-oriented operations. The algorithm is based on the use of a random permutation. Analysis shows that the ...
120 views

### How did the power measurements translate to AES Key?

A side channel attack is described here. I did not quite get , how the power measurements are used to get the decryption key , can any body explain it?
59 views

### What is the polynomial to use in the Massey-Omura cryptosystem?

The Massey-Omura cryptosystem uses "multiplication over the finite field $GF(2^n)$. I'm just starting understand the idea of multiplying polynomials and I've searched for online calculators to use for ...
95 views

### What are the computational benefits of primes close to the power of 2?

Recently I was reading some article about the Bernstein's Curve25519. This is a particular Montgomery curve over $\mathbb{F}_q$ where $q = {2^{255}-19}$. What I missed or was unable to understand is ...
636 views

### Can I jettison MAC if I already have SHA1(M)?

I'm currently using SSL with AES-CBC and HMAC for a file transfer containing string M. Now suppose Alice already knows SHA1(M) (and the adversary does not), and she downloads M from Bob using only ...
166 views

### Idea for secure password hash-likes, is this feasible/usable/workable?

(Hand moved from stackoverflow.com,due to suggestion) Since breaking password hashes has become a new passtime for scriptkiddies, I thought of the problem and came up with a novel(?) idea. store ...
772 views

### Good enough deterministic PRNG based on hashes

Lets say I have a seed named iv which has a decent amount of entropy. Are there any glaring issues with the following? First 64 bytes are generated by SHA512(iv) Next 64 bytes are generated by ...
241 views

### Do all stream ciphers (and AES-128-CTR in particular) produce equal output size as the input size?

I'm particulary interested on knowing if the output of the AES-128-CTR ciphertext is always going to have the same size as the input plaintext, or it could be padded somehow. It seems so from my tests ...
61 views

### Encryption - How to find $\sigma$?

Alice communicates with Bill using an encryption system of type Feistel. Specifically, each block has a length of 128 bits, the algorithm has 4 rounds and the common secret key of Alice and Bill is ...
193 views

### Symmetric mutual authentication with client using a derived secret

I'm attempting to find a client/server authentication protocol that allows the client and server to authenticate each other when the client doesn't know the server secret but does have a sensitive key ...
267 views

### Is cryptanalysis of CTB-Locker really impossible?

It seems that CTB-Locker make a lot of victims nowadays, and yet, the full encryption scheme of it is now publicly known [1,2]. Would any of you could find a weakness to exploit in this encryption ...
130 views

### IV's for different AES encryption modes

I wanted to know if my understanding is correct! I have been reading up on aes encryption and modes(specifically CTR and CBC) and it took me sometime to understand the concept of IV. If the IV is ...
188 views

### Why is Poly1305 popular given its 'sudden death' properties?

ECDSA has the undesirable property that if a key pair reuses a nonce in a signing operation, the cryptosystem experiences catastrophic failure in the form of private key leakage. I've heard this ...
54 views

I built a system that allowed users to generate an unlimited number of email addresses. Instead of storing each one in a db, I created addresses dynamically and made the address an hmac signed ...
229 views

### Anonymous Gravatar Problem

Gravatar is a service that serves avatars for users based on md5(email_address). The hash is embedded on websites, so it's public. One of the problems with this ...
6k views

### What is entropy?

We discuss a lot of topics and use measures of entropy to determine how difficult it is for an attacker to be successful. What does entropy mean in the context of cryptography? How is entropy ...
72 views

### Crack RSA with additional information [duplicate]

Suppose $N=3953$, Alice encryption key is $e_A = 337$ and bobs is $e_B=23$. Eve happens to know the corresponding decryption keys, $d_A=3385$ and $d_B=2663$. Can I use this information to find the ...
83 views

### ECIES with AES-GCM

The Elliptic Curve Integrated Encryption Scheme (ECIES) describes how to derive a "temporal" key, encrypt a message (eg. using AES) and creating a MAC. However, from my understanding using AES in GCM ...
67 views

### How to store and use a Cryptographic Seed in a database [closed]

Companies such as Barclays use cryptographic seeds (for their PINsentry system), RSA do the same for RSA SecurID, but how do they safely secure the seeds in the database. With passwords you just hash ...
117 views

### Equivalent key size between HMAC and AES?

I have seem comparison between AES and RSA, e.g., AES 128 bit key is equivalent to RSA modulus 3072 bits. Is there such comparison between AES key size and HMAC?
101 views

### Is it necessary to encrypt nonce in cryptographic communication?

Server and client have a pre-shared key K. Assuming that that pre-shared key is safe, so nobody other than server/client can encrypt/decrypt. Client sends a nonce N to server, server then sends back ...
74 views

### Pseudorandom number generators based on hard problems in mathematics

I know that Dual_EC_DRBG's security is based on the ellitpic curve discrete logarithm problem, Micali-Schnorr is based on the difficulty of factorization, and MQ_DRBG is based on multivariate ...
78 views

### Questions about updating the secret key of RSA?

I want to update the secret key of RSA. I understand there exists a common modular attack on RSA. Precisely, if adversary knows $(e_1, m^{e_1})$ and $(e_2, m^{e_2})$, where $e_1$ and $e_2$ are the ...
172 views

### Alternative sources of random numbers

Considering that algorithmic methods for generating unpredictable streams are hard to come by, I've wondered if any of these potential sources are good for making keys, seeds, and the like: stocks, ...
513 views

### SHA-512 Length Field - What is it?

If I am using SHA-512 on a message and need to determine the padding field and length field, how do I determine the length field? I think I understand the padding, but not the length field. For ...
53 views

### How does the attacker include input before compression and encryption in CRIME?

I have read this article about the CRIME attack against TLS and SPDY. The article says that: What is not yet clear is how the attacker is including their input in the source material before it ...
56 views

### Requirement for the exponent generation during DH protocol [duplicate]

The setting is classic DH protocol. Alice computes $A = g^a \bmod p$. Alice then sends $A$ to Bob. Then Bob will send $B = g^b \bmod p$ to Alice. Are there any requirements for the values $a$ and ...
102 views

### Crypto++: How to re-generate pseurandom integers in Crypto++

I'm using Crypto++ to implement my protocol to mask a value $y_i$ by a seudorandom value $r_i$ such that $m_i=y_i \cdot r_i$. Since there are many $r_i$'s I want to generate them using PRG and then ...
110 views

### Counter Mode (CTR) and mult-CPA

I am not sure if Counter Mode (CTR) encryption is mult-CPA (chosen-plaintext attack) secure or not.
175 views

### Is Pseudo-Random Generator (PRG) in OpenSSL uniformly distributed?

I need to know can we use PRG of OpenSSL as a PRF?
2k views

### How easily could this be cracked?

I'm looking into encrypting files like this: First, I SHA-1 hash the password. Let's say the password is something normal like "hello123", and then hashed. Then I encrypt a file using this: ...
152 views

### Explanation of each of the parameters used in ECC

I'm having a very difficult time finding a clear explanation of the parameters used elliptic curve cryptography. I know for certain that $p$ is the number or order or whatever of the given field that ...
76 views

### Hashing - Digital Signing and Trivial Stretching

Two very basic questions: 1. Digital Signing Why is it not possible to just simply replace the hash value from the request? Examples: ...
263 views

### Can we say that if $P=NP$ there is no CPA secure public key encryption?

I've learned that public key encryption is based on the problem of Discrete Log (as regard to group theory) which believed to be hard. But, can we say that it doesn't matter on which problem our ...
174 views

### McEliece information set decoding attack vulnerability

Wikipedia states that McEliece is open to "information set decoding attack". What is an "information set decoding attack" and how serious is the vulnerability? (is it just a matter of choosing proper ...
115 views

### Does key derivation with known parameters add any security?

First up: this is a question about a concept that I try to wrap my head around; it is not about the specific implementation. Anyway… I have the following scenario (simplified to show the problem I ...
161 views

### Malicious DH groups

Can an attacker construct a DH group, large enough to be considered secure (say, a modulus of 2048-bits), such that the group appears safe, but the attacker is able to solve the DLP in the group ...
320 views

### What is the forward cipher function of AES-XTS?

We're using OpenSSLs EVP_aes_265_xts encryption on data (with unique, random, IVs for every new message encrypted) - which is working well. But, I've been asked; what is the forward cipher function ...
65 views

### Text in random image encoder: is it flawed?

I have created a small cryptographic programme: You input your text A random image is generated Random coordinate pairs in number equal to the chars of the message are generated. The red component ...
72 views

145 views

### Is the complexity of Caesar (shift) ciphers “n * n!”?

Can we say that any shift cipher to be decrypted needs an algorithm of complexity “n * n!”? (where n is number of possible ...
167 views

### What is the importance of adding round key in AES

I know this may not be the place to ask this but I have found it difficult to find an answer to this question. I know the steps of the AES encryption algorithm but I am finding it difficult to ...
351 views

### Is this key management scheme secure?

I'm designing a scheme for management of a small number of cryptographic keys (< 100 at any given time) and I had an idea: rather than storing all the keys, could I just store one master key and ...