# All Questions

489 views

### Use of CBC-AES-256 to encrypt usernames

I came across some code in our project that encrypts usernames (limited to 50 chars, most are less than 10) using the following parameters: IV size is 16 bytes Key size is 32 bytes Algorithm is ...
693 views

### How to check the strength of an encryption algorithm?

I asking for advice on how to check strength of an encryption algorithm.
799 views

### ECDH VS. DH benchmarking in JAVA

So basically my problem is the odd result i get when measuring the time it takes to generate a ECDH key in java vs. the time it takes to generate a DH key. I compare the time it takes to generate: ...
97 views

### Question about use of IV in this cipher

Main cipher objective : Generate a keyed CSPRN stream, that does not expose useful information about the state of the CSPRNG, and xor this with the plaintext. To prevent an attacked who could somehow ...
1k views

### How do I derive the time complexity of encryption and decryption based on modular arithmetic?

I want to calculate the time complexity of two encryption and decryption algorithms. The first one (RSA-like) has the encryption $$C := M^e \bmod N$$ and decryption $$M_P := C^d \bmod N.$$ ...
70 views

### Two files encrypted with related data versus one file

I have some code that takes a list of credit-card numbers, splits the number into two chunks, one chunk is 8 characters long, the other chunk is the remainder. Each series of chunks is saved into ...
102 views

### How does this Cesar Cipher work?

Suppose I have this cryptogram: http://pastebin.com/QpfRMBg1 Clearly it's a Ceasar Cipher which decrypts to: http://pastebin.com/r50heZuU with a simple shift of 10... OKay, no big deal. Let's take a ...
188 views

### Can Add and Multiply On Cipher Text achieve all operations?

A Fully homomorphic encryption scheme needs to support an evaluate function that can do add and multiply operations on cipher text. Can we do all kinds of complex operations on cipher text like ...
67 views

### Is there a big RSA Data Set

Is there a big dataset containing RSA public $(n,e)$ and private keys $d$ and primes $p,q$ where $n = p.q$ ?
366 views

### Can a shift cipher attain perfect secrecy?

On a practice question for my intro cryptography exam, it asks the following: Assuming that keys are chosen with equal likelihood, the shift cipher provides:    A) computational security ...
189 views

### Deterministic key generation

In a situation where it is required to generate n number of keys deterministically from a single piece of seed information can we assume that b breached number of keys, no matter what the quantity ...
100 views

### On the fly key generation for cloud storage objects

Cryptographic key management involves storing and managing encryption decryption keys , certificates , signatures etc . If the requirement is just to store and manage object specific keys ( say ...
165 views

### Crack cryptographic hash functions using Toffoli gates?

Might it be possible that reversible combinatorial circuits (or some emulating software) are going to be used to get the input of the white box? I mean if I have constructed a proper reversible ...
237 views

### Finding partial pre-image of MD5 hash

I have the following requirement for hashing using MD5. H(A,B,C,X); Where values A,B & C are given. However X is not given. I would like to find out what value of X would give a hash beginning ...
191 views

### ECM Implementation is really slow

I followed the algorithms 14.4 (computes 1st and 3rd coordinates in (X,Y,Z)#k modulo n) and 14.5 (factorization using ECM) in David Bressoud's book 'Factorization and Primality Testing'. I think the ...
315 views

### Key derivation from a random seed

The main problem is to use a block cipher to generate a random key. I would like to generate 256-bits key which can be as random as possible. I generate it in the following way: Pick a plaintext ...
435 views

### How to test distribution of a hash function?

From what I've found, it is generally accepted a cryptographic hash function like SHA-2 has an evenly, randomly distributed output. Is there a way to test this without running through the entire ...
2k views

### How to decrypt AES in CBC

i am having problems understanding how CBC works! I know that it is a chain and the IV is XORed with the PT but then what? I mean we encrypt it with key k and the result is the CT which we use for the ...
183 views

### How is block cipher padding verified for consistancy?

Under what circumstances is a decryption routine able to tell that the padding of a message is invalid? If a cipher text block where to be randomly modified, what is the probability that the padding ...
107 views

### MD5 pre-fixing with an unkown postfix

Is the MD5 prefixing attack still valuable to an attacker if he doesn't know the postfix of the string? For instance, what if the following sanity check was being used: ...
166 views

### homomorphic encryption special case of multi party computation?

I read that Fully Homomorphic Encryption schemes are special case of Secure MPC in page no 3. Especially , generalization of two party computation problems stated by Yao But is there any additional ...
221 views

### Are there any multiparty homomorphic encryption schemes?

Are there any multiparty homomorphic encryption schemes ? Most of the literature is about two party schemes . Is there any generalization made for n party ?
141 views

### Trying to find an algorithm to share portions of a key with multiple people

Sorry if this question's a bit basic, but I don't know of any way to ask it concisely enough for a search... What I'm looking for is a proven means of doing the following: Create x number of ...
175 views

### Relation between Threshold Cryptosystem and Secure Multiparty Computation ?

Is there any relation between secure multiparty computation and threshold cryptosystem ?
192 views

### Using “Additional Authenticated Data” as a secondary key

In implementing a cipher in GCM or CCM mode, you are provided the option to add "Additional Authenticated Data" (AAD). This AAD is required for decrypting the cipher text, and seems to be used when ...
589 views

### AES GCM implementation in c#

I am implementing an AES cipher in GCM mode in c# and have a few questions. My code is based on the code found here for reference. I'll copy in the relevant portions. ...
115 views

### About “nonce” in Initialization Vector(IV)

When we talk about nonce in Initialization Vector(IV), is it required to used numbers only? not any letters or special characters?
137 views

### Probability of Repeated Encrypted Block In Output Feedback (OFB) Mode

Is there any probability/chances of repeated encrypted block in Output Feedback (OFB) mode? Is there any existing documentation/studies about that? If it is existing, can you please provide me a link ...
147 views

### Can you distinguish encryption methods from the output?

Suppose that you see all IP communication packets between two computers for a day, as they pass through a connecting router, and this amounts to 10MB. You additionally know that all data transmission ...
1k views

### RSA Proof of Correctness

Can anyone provide an extended (and well explained) proof of correctness of the RSA Algorithm? And why is it needed? I can't say that this or this helped me much, I'd like a more detailed and newbie ...
738 views

### How can 3DES encryption use decryption in the middle step?

I have been reading about the 3DES algorithm and I cannot understand one part. In 3DES we do following operation: $$C=E[K_3,D[K_2,E[K_1,P]]].$$ Where $C$ is ciphertext, $P$ is plaintext, $E$ is DES ...
68 views

### Cryptographic Algorithm/Protocol needed

I am trying to achieve the following: Encrypted files are stored on users filesystem. The user uses my client to authenticate against a server. Once he is authenticated successfully he gets a token ...
198 views

### Is this a secure multiparty protocol? [closed]

I am facing the following situation and I am trying to break down the problem into some specific cryptographic primitives: There is a function $F$ that takes as input a bit string and produces a ...
88 views

### Encrypting documents through a proxy key

Suppose I'm developing an app to secure a lot of documents. These documents were encrypted (say, using AES) with a key X. This key X is basically the password that the user enters before wanting to ...
272 views

### Existing dictionaries of popular words to help solve a random substitution cipher?

I'm trying to find faster ways to solve this: http://cryptogram.org/solve_cipher.html Actually lists of common words are good, but they are often limited to 1000 words. I found this, but I'm not ...
53 views

### Proving item association without revealing one of the associated items

I'm a total noob when it comes to cryptography but I believe this falls under the "zero knowledge" category. I have two associated pieces of information: tag — known by both parties. Unique per ...
258 views

### My custom handshake

I am a beginner in cryptography and I designed a custom handshake between 2 entities $\rm C$ (client) and $\rm S$ (server) which should meet the following requirements: Requirements: The handshake ...
165 views

### ID-Secret Scheme

I have an ID-Secret scheme and I'd like to hear if there are any vulnerabilities present. Party 1 and Party 2 hold some credentials, an ID and a Secret. Party 1 Creates this message: ...
170 views

### why inverse in diffie-hellman protocol will not give same value?

Security of diffie hellman protocol is $K=g^{ab}$.if sender want to calculate value of $b$(given $a$) he can do $g^{{{ab}^b}^{-1}}$(where K=$g^{ab}$) which will give $g^{a}$ as we are cancelling value ...
85 views

My question is related to PBKDF2. I am unsure how to validate user entered password with already existing hashes and salts. I have heard of the so called "length-constant" comparison which basically ...
137 views

### PRP, PRF and modular arithmetic

Are there any arithmetic or mathematical functions that can be used as PRPs or PRFs ? Since, Conventional block ciphers like AES are that are proven to be good PRPs are not based on mathematics but ...
62 views

### Necessity of changing $p$ and $q$ when your private key is exposed?

Suppose your private key $d_1$ has been exposed. Instead of changing $p$ and $q$, instead you just choose a new public and private key (say $e_2$ and $d_2$) and use these instead. What kinds of ...
73 views

### Homomorphic crypto allowing anonymous yes/no votes?

I'd need a crypto system allowing online yes/no votes but without revealing who voted what. Is a "partial" homomorphic crypto system what I'm after? Would, for example, Damgard-Jurik work in my case? ...
111 views

### Exercise: Attack on a Two-Round DES Cipher

Working through the exercises in Cryptography Engineering (Schneier, Ferguson & Kohno) I have stalled on the following exercise: Consider a new block cipher, DES2, that consists only of two ...
85 views

### If its possible to derive the public key from a private key, why can't we go in reverse?

I'm looking at source code for BitcoinJ that derives a public key from the private key. ...
92 views

### Current standard for hash function security parameter?

When designing a hash function, what should be the secure input and output lengths? In particular, what lengths do I need for collision resistance?
78 views

### Is this approach to generating a “random” number from a sha512 hash effective?

I'm looking to run a small raffle but i'd like people to be able to verify that the number chosen was fair. I know some sites use a "Provably Fair" system to achieve this where user input is combined ...
66 views

### Generating Diffie-Hellman parameters efficiently

I am working on an Android project for school and I am supposed to do a DHKE (Diffie Hellman Key Exchange). Everything works well. The problem is that it takes a lot of time (really a lot) to ...