# All Questions

134 views

### Quantum key distribution and OTP

Why is QKD usually associated with OTP ? QKD is about key distribution, where as OTP is about using key as long as message to get perfect secrecy, can any one explain how they are related ?
961 views

### In layman's terms, how does Shor's algorithm work?

I've just been reading up on Shor's algorithm, and I find it both fascinating and baffling. I don't really understand much about it, other than that it can factor semiprimes in polynomial time. Could ...
831 views

### How to encrypt a short string and keep the length secret

I need to encrypt relatively short strings (generally less than 100 characters). If possible, I want to avoid leaking the length of these strings. How can I do that? The thing that came to my mind is ...
3k views

### Strength of multiple hash iterations?

Is it correct that increasing the iteration possibly decreases the cipher strength but increases the amount of time it would take to find the original hash values if using brute-force on a given hash? ...
138 views

### Attack by replaying messages

Assume Alice and Bob communicate over an insecure channel using one-time perfectly-secret encryption together with one-time secure message authentication code. Say Eve has the ability to eavesdrop and ...
111 views

### How to hide bit frequency of the inter-packet delays covert channel?

I encode a hidden message as different delays between packets of another data stream. My implementation now is that for each bit, if the bit is 0, a inter-packet ...
333 views

### Proving correctness of pseudorandom generator construction given existing pseudorandom generator

Say if I have a given pseudorandom generator G which takes a k-bit input and outputs a 3k-bit number. How should I show that a specific construction using this pseudorandom generator is valid? For ...
163 views

### RSA encryption input range - plaintexts that map to ciphertexts?

According to the wiki article on the RSA encryption function, the valid range of input $m$ is $0 \leq m \lt n$. However I have found that the following values of $m$ always return themselves when ...
587 views

### Why are elliptic curve variants of RSA “chiefly of academic interest”?

Yesterday I was thinking about elliptic curve variants of popular protocols/algorithms (ECDH, ECES[1], etc) and the thought occured that I had never seen an elliptic curve variant of RSA. My ...
1k views

### Salting when encrypting?

I was attending a database encryption session at a developers conference. The presenter (who was a published author on the subject) said that MS SQL Server did not support salted hashes in the ...
372 views

### server side Javascript security

It is accepted that the javascript library lacks the ability to create an adequate PRNG. My understanding that this was mainly due to the limits of a sandboxed browser enviroment that javascript ...
147 views

### Correct method to encrypt data so that it can be decrypted only by Alice and Bob

I need to build a system that stores encrypted transactions. Transaction involves always two parties. Payer and payee. Both must be able to download encrypted transaction from server and decrypt it ...
581 views

### Calculating cycles per byte

Cycles per byte seems to be a critical concern in designing and choosing stream ciphers. For example, from Wikipedia, RC4 has 7 cycles/byte on original Pentium chips. How is this calculated? Do they ...
123 views

### Tips on conceiving safe software messaging platform

I have a personal project in mind in which I plan to use cryptography in order to let the users be confident in the fact that, even if all data get's stolen, it would be virtually impossible to crack ...
2k views

### What are the main weaknesses, if any, of a Playfair cipher?

What are the main weaknesses, if any, of a Playfair cipher? I know that they depend on none of the letters missing, but that is an easy fix if a letter gets dropped. Besides that, are there any other ...
174 views

### How could block encryption in counter mode be secure from viewpoint of entropy?

A good block cipher e.g. AES running in counter mode is commonly considered to be secure. Assuming a perfectly random key, one could in this case from $128$ bits generate up to $2^{128}·128$ bits for ...
451 views

### What is the strength of unpadded RSA?

I would like to use unpadded RSA for homomorphic encryption in a toy P2P game, for things like fair coin flips and shuffling. How many bits of security does unpadded RSA have, in relation to its key ...
557 views

### How to avoid a chicken and egg scenario with encrypting passwords?

I am working on application that allows users to upload files containing company data and then share those files with a list of other users that have specific roles within the system. I want to ...
423 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 ...
649 views

### is this RSA private key valid?

is this RSA private key valid? First, here's the RSA private key in question: ...
365 views

### Exact mathematical definition of simulation based security?

I've been trying to understand cryptographic protocols and how to define their security. The problem is that while I can understand what the intuitive definition says, I have trouble understanding how ...
763 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 ...
120 views

### WebcryptoAPI - secure or not [closed]

This is about the new W3 WebcryptoAPI draft standard. Here is a post by one of it's authors https://plus.google.com/u/0/105761279104103278252/posts/CSwVZ1RUijo It says its in part trying to change ...
1k views

### Figuring out key in hill cipher (chosen-plaintext attack)

I have been wondering what approach to take in order to figure out what key was used to encrypt a message using the hill cipher. I know it is possible to obtain it even if it were just a ...
1k views

### Which is more secure using a CSPRNG for a One-time pad, or AES?

In reading about the One-time pad it appears to need truly random key for the pad. Since true random values are not practical to generate this presents a problem (thus making One-time pad less ...
455 views

### Several questions about Paillier cryptosystem

I have several questions concerning the original Paillier cryptosystem as described in Paillier, Pascal (1999). "Public-Key Cryptosystems Based on Composite Degree Residuosity Classes". EUROCRYPT. ...
143 views

### Safety of a pre-keyed DH-Key Exchange

Asuming this scenario: Bob and Alice each have the public key of the other party for a D-H function and want to exchange data. Now, if they each generate their shared secret, is it safe to assume ...
316 views

### Blowfish Encryptions in Bcrypt hashing algorithm

I am trying to understand the ExpandKey function used in the bcrypt hashing algorithm. As per the documentation of bcrypt hashing algorithm on USENIX here: ...
387 views

### Why is there a strong distinction between stream and block ciphers? [duplicate]

If I don't err, in the literature a stream cipher is one in which each plaintext bit is processed individually, commonly via xor-ing with one bit of a random or pseudo-random bit stream, while a block ...
13k views

### FIPS 140-2 Compliant Algorithms

Is there any reference to check the list of encryption & signing algorithms which are compliant to FIPS 140-2. After an exhaustive search I could find only "AES". Any suggestions would be much ...
3k views

### Is RSASSA-PKCS1-v1_5 a good signature scheme for new systems?

Is RSASSA-PKCS1-v1_5 a good signature scheme to recommend that people use in new systems? Is it believed to be secure and represent the state-of-the-art in RSA-based signatures? I understand that ...
273 views

### How to plot the distribution of a ciphertext?

Is there any plot or visualizing program that can plot the distribution of a plaintext and then the distribution of the ciphertext after applying a ciphering encryption algorithm? I am interested ...
21k views

### Possible ways to crack simple substitution ciphers

We had a quiz in class today where we had to break the ciphertext with the key given, but not the algorithm. Suffice to say that I wasn't able to decrypt it within the alloted time of 12 mins and will ...
3k views

### How many keys does the Playfair Cipher have?

I was just studying the Playfair cipher and from what I've understood, it is just a slightly better version of a Caesar cipher, in that it isn't actually mono-alphabetic but rather the 'digrams' are ...
732 views

### Why do public keys need to be validated?

For some curves it's necessary to validate the public-key of the other side before running an elliptic-curve Diffie-Hellman key-exchange. Apparently if you don't validate the public key, small ...
1k views

### Shortcuts / practicality of brute forcing block cipher (AES) + ECB with known plaintext

I know the plaintext (26 bytes long) and cryptotext of block cipher (suspected to be AES) in ECB mode. I can generate hundreds or thousands of such samples, but the samples are not arbitrary. What are ...
94 views

### Data-validating protocol

I have to implement protocol of secure data transfer that can be described as Alice selects data to send from finite set $m\in M$ (e.g. $M$ could be a column of values in database table) Alice ...
120 views

### Is the mod_auth_tkt scheme secure?

The third-party Apache plugin mod_auth_tkt uses a tragically-not-HMAC construction: ...
391 views

### What is a “rewinding argument”?

I've been reading a bit about cryptographic protocols and I keep seeing the phrase "rewinding argument". I've been unable to find a good source that would explain what is meant by this. It seems like ...
867 views

### How to implement order preserving encryption or order preserving hashing [closed]

Does anybody know any free implementation of either order preserving encryption or order preserving hashing? I've found some codes like CMPH but I need to dynamically add new DATA and that's why most ...
377 views

### Encryption scheme with equivalent keys?

I've long been looking for a symmetric encryption scheme (or algorithm) with equivalent keys. Let me define what I want: Symmetric encryption algorithm with encryption function $E_k$ and inverse ...
95 views

### Dimension of Encryption of a linearly dependent set of plaintexts

Suppose I have an encryption scheme of the form $E(P)=C$ where $P$ is the plaintext and belongs in $\{0,1\}^N$, $C$ the ciphertext which belongs to $\{0,1\}^M$ and the encryption is performed under ...
217 views

### fixing WEP by treating all messages as one long stream

in the course of introduction to cryptography on coursera professor suggested treating all messages as a long stream XORing them with the key this way we will not need to change the key and will not ...
1k views

### BouncyCastle Elliptic Curve implementation

I'm implementing ECDH key exchange in C# using the BouncyCastle library and I'm having a hard time understanding the elliptic curve side (FpCurve). ...
818 views

### Why RSA can't handle numbers above 76?

I'm going to encrypt the characters Zhu, and decrypt them using RSA. I'm using the public key $\{e, n\}$ and private key $\{d, n\}$. The values of $e$, $d$ and $p$ ...
3k 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 ...
3k views

### How do ciphers change plaintext into numeric digits for computing?

For example, in RSA, we use this for encryption: $ciphertext = (m^e \mod n)$ and for decryption. If our message is "hello world", then what number do we have to ...
171 views

### Structure of encrypted office files

I try to find out the structure of encrypted office files (I'd like to implement something like a carving tool for finding certain encrypted file types). I try to understand the Office Document ...