# All Questions

87 views

### Proving a decision was randomly made [duplicate]

Alice and Bob want to agree on a bit $0$ or $1$. Both know it would be fair to pick that at random, but there's no way they could meet to throw a dice and no third party they could trust. Are there ...
116 views

### Verifying multiplicative inverse on a prime field in NIST's ECDSA_Prime.pdf

I am trying to learn about the Elliptic Curve Digital Signature Algorithm (ECDSA) by verifying the results in some example calculations. I found a PDF of example ECDSA calculations from NIST here: ...
97 views

### Changing a bit Changes Hash

I am very curious on the fact that SHA, MD5 and all related Hash Functions change the output even by changing one bit in input Message. Why is that?
103 views

### How can I show that the DDH problem is self-reducible?

I have trouble to understand how I can show that the Decisional Diffie-Hellman problem (DDH) is self-reducible. I found this as a description of a random self-reducible problem. ...
147 views

### Do any one-key-of-many cryptographic schemes exist?

I'm pretty sure I understand how public/private key cryptography works. Anybody can encrypt a message using a well-known public key, but only the person who holds the private key can decrypt it. My ...
147 views

### Given p and q of DSA how do you show they are prime?

I am given p = 4916335901 q = 88903 and am asked to show these are prime as well as q|(p-1) in DSA. I am unsure on how to ...
916 views

### How to calculate the maximum output size for data encrypted with a RSA Private Key?

I have an an encryption algorithm I am working with that looks like this: prv_key_enc(sha1_hash(data)) Where, the RSA parameters are: RSA/ECB/PKCS1Padding 1024 ...
258 views

### What key exchange protocols give Forward-Secrecy resisting future progress?

I (wrongly) understood what I've been told as meaning DHE in TLS, PFS in IPSec do not provide Forward-Secrecy; and I'm told that common forward-secure key exchange protocols are restricted to ...
290 views

I know about PBKDF2, bcrypt, scrypt, etc. and while I'm not a crypt professional, I think I understand why are they better than just "hash(pass+salt)". But a colleague of mine surprised me with the ...
296 views

### How is LUKS dm-crypt secure if the key is stored with the encrypted data?

I've posted this question over at superuser, but haven't had any success at getting answers. That's why I've posted it here. Furthermore, I believe this is a more appropriate place for it as it is ...
159 views

### Is use of pre-shared key for sharing session key in symmetric key cryptography vulnerable to MITM?

Consider the following protocol: ...
90 views

### Pseudo random permutation for arbitrary size domains

Popular block ciphers like AES or Twofish are keyed pseudo random permutations on the domain $\{0,1,\dots,2^{k}-1\}$ with $k\in\{128,192,256\}$ or similar. I'm interested in pseudo random ...
165 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 ...
147 views

### Help in understanding exactly how lattices used as one way functions for hashing

I am doing a cryptography course via long distance and we have been given an assignment which is based on lattice-based cryptography. I have spent the majority of the past week sifting through papers ...
336 views

### Why can ECC key sizes be smaller than RSA keys for similar security?

I understand how ECC is based on the discrete log problem and RSA on integer factorization. I've read several references that show how a solution to either of these problems can typically be adapted ...
158 views

169 views

### Diffie-Hellman: Does the size of the prime modulus depend on the potential size of the secret?

I'm writing my own cryptosystem that uses One Time Pad and Diffie-Hellman to generate keys for the OTP. I am using Rails on the server side and Javascript for the client side. Please don't tell me ...
100 views

### How well does breaking multiple DH key exchanges over the same group scale?

Suppose you are running a server with the Diffie-Hellman parameters (so the group G and generator g) generated once. There are ...
176 views

### Brute force attack expected running time

I am a bit confused about the expected running times of brute force attacks on different cryptosystems. So let's assume a key size of $2^n$ bits. Symmetric key cryptography: $E(brute)$ = ...
285 views

### Is CBC mode encryption vulnerable to a reordering attack?

I know that, if CBC-MAC is used in such a way that the tag is the concatenation of all the blocks' outputs (and not just the last one), it's insecure under CPA for the simplest case of 2 blocks ...
210 views

In the elliptic curve: $y^2 = x^3 + 20x + 13 \bmod{2111}$. Using the point $P=(3, 10)$ I am wondering how to multiply this point by the scalar $57$? I realize I can write $57*P$ as $2^5*P + 2^4*P + ... 3answers 478 views ### How do I test my encryption? (absolute amateur) I am a hobby programmer with a background in biology and have developed an encryption program based on DNA. I tried to make it hard to crack, but it's essentially a substitution cipher and uses the ... 1answer 212 views ### Why is it important to generate a pseudorandom permutation from a pseudorandom function? Most of the papers on block cipher constructions, especially the ones which discuss constructing block ciphers of arbitrary lengths or small domains, the techniques are designed based on building a ... 1answer 276 views ### RSA 896 vs 1024 vs 2048 in Javascript? I am currently working on a secure messaging website and I had been using RSA 2048 for encryption, decryption and signing of messages but I found it to be EXTREMELY LAGGY so i've moved to 1024. I did ... 1answer 591 views ### How good is using AES CTR mode with initial counter as 0? Is it advisable to use AES CTR mode with the counter initialized to 0? How good is it in security terms? 2answers 174 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 113 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 ... 3answers 348 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 ... 2answers 193 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 155 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 ... 1answer 195 views ### Security considerations on “expand 32-byte k”-magic number in the Salsa20 famility of stream ciphers? I'm currently examining the NaCl library written by Daniel J. Bernstein and I noticed that the library hard codes the sigma: ... 1answer 938 views ### How much is slower GCM AES-128 than one of the stream chipher eSTREAM? Evaluate the speed of the algorithm GCM AES-128 and compare it whith speed of one of the stream chipher in eSTREAM. Can someone give such an assessment? 2answers 327 views ### Do we have to use an IV for AES encryption to be FIPS 140-2 compliant? I asked this question Will our app be FIPS 140-2 compliant if we use our own AES algorithm implementation here before and although there are some different thoughts about this, the general consensus ... 1answer 313 views ### How does one use AES block cipher modes of operation? This is the sequel to my previous question about AES block cipher modes of operation. (See: AES block cipher modes of operation) Now, here is my real problem. I have to use a block cipher with 8 bit ... 1answer 148 views ### Which platforms are most vulnerable to Simple Power Analyse Attack In a "Simple Power Analyse Attack", the difference in power consumption during multiply or square operation is used. In the RSA decryption process with the "Square and Multiply" algorithm, both ... 1answer 403 views ### How hard/easy will be to break a SHA-1 or SHA-256 hash if the attacker knows part of the original text? I'm creating an algorithm to hash some text variables (20/30 characters long) to send them across an insecure channel. I'm not dealing with high security data, so no credits card numbers or any other ... 1answer 195 views ### Rijndael: explanation of Rcon on Wikipedia? I stumbled onto the explanation of Rijndael Rcon on Wikipedia, and I can't follow it. The example for Rcon indicates that Rcon(9) is 0x1b. That could make sense… ... 2answers 3k views ### What makes RSA secure by using prime numbers? I am just learning about the RSA algorithm. Looking at the first two steps: Choose two distinct prime numbers$p$and$q$. Compute$n = pq$. I have some probably stupid questions: Why do$p\$ ...
764 views

I would like to know how much padding OpenSSL algorithms expect.
300 views

### Can I construct a feasible stream cipher out of HMAC and a secure hash algorithm?

I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm: Let: (Actually Objective-C styled pseudo code) ...
392 views

### AES with different modes of operation

I'm taking up a cryptography class and this is for an assignment. We're asked to find the differences between AES/RSA in the different modes of operation vs the one timepad method. From wiki, I can ...