# All Questions

143 views

### credit card number encryption using aes-ctr mode

I want to encrypt credit card numbers. I want to apply AES-CTR mode. Is it suitable for that? How can I store nonce and counter values for an individual credit card number? How can I send the ...
56 views

### security of pairing based cryptography

while going through some papers on cryptographic accumulators i find the following statement "several pairing-based accumulators have been proposed in the past. However, due to continuous and recent ...
127 views

### Why would using a random seed with other variables be bad for ecrypting if you can't guess the key?

I asked this on stack exchange with it being code based, but someone suggested to ask here. Basically, I've done a script in python and wanted an option to encrypt the input, but I couldn't get any ...
28k views

### How can I use SSL/TLS with Perfect Forward Secrecy?

I'm new to the field of cryptography, but I want to make the web a better web by setting up the sites that I host with Perfect Forward Secrecy. I have a list of questions regarding the setup of ...
5k views

### Is there a simple hash function that one can compute without a computer?

I am looking for a hash function that is computable by hand (in reasonable time). The function should be at least a little bit secure: There should be no trivial way to find a collision (by hand). For ...
96 views

### How are RSA and ElGamal compatible in PGP?

I'm starting to play with PGP and I don't understand how if your key pair is RSA you can encrypt a message for someone whose key is for example ElGamal. How does the asymmetric key exchange work if ...
478 views

### SHA-1:Is there any mathematical result that gives us the minimum number of 1's in a 160-bit SHA-1 hash output?

Is there any mathematical result that gives us the minimum number of 1's in a 160-bit SHA-1 hash output? What is the probability that a 160-bit SHA-1 hash output contains at least 128 1's?
76 views

### chaining multiple key derivation functions together

I was looking at PBKDF2, bcrypt and scrypt as options for key derivation; and would like to try using them all together in order to get the cryptographic strength of the strongest one (which seems to ...
112 views

### How do you implement a cipher as one lookup table?

I am reading up on whitebox cryptography and have trouble understanding how are ciphers implemented as one lookup table? assuming my plaintext is just 4 bits so the size of my lookup table should be ...
334 views

### Practical Attack on RSA

Currently I am designing an RSA based application, and I am thinking of how long should the key be in order to be secure against attacks. I know that RSA 4096 bit key can be recovered using Sound ...
411 views

### Purpose of expanding then shrinking in SHA-1

What is the purpose of expanding then shrinking in SHA-1? Does it serves any security purposes?
130 views

### Replacing the PRF in PBKDF2 with Keccak

I am unable to find a reliable, tested library for a decent password based key derivation function e.g. Scrypt in the programming language I am using, but I have a reliable library for PBKDF2 (which ...
49 views

### What does invertibility of the cryptographic primitive mean?

source: http://www.cosic.esat.kuleuven.be/publications/thesis-152.pdf ,page 32 Note that key recovery implies invertibility of the cryptographic primitive (because due to the Kerckhoffs’ ...
887 views

### Estimating random number entropy for input into 256 bit hash

Assuming a random number generation process outputs lots of numbers between 0-9. First I gathered up a bunch of the numbers, converted them to binary and created a bitmap. Not so random as you can ...
113 views

### Naive implementation of Rainbow Table and/or Hellman's trade-off

Is there any naive implementation of Hellman's cryptanalytic time memory tradeoff in C and/or a naive implementation of Oechslin's rainbow table algorithm in C as well? I have seen some ...
38 views

### AES product function

Small description: consider a polynomial in GF($2^8$) , which has the form $$f(x) = b_7x^7 + b6x^6 + b_{5}x^5 + b_4x^4 + b_3x^3 + b_2x^2 + b_1x + b_0$$ If we multiply by x , we have x * f(x) = ...
99 views

### Which algorithm can be performed by humans?

Suppose I want my grandmother to perform encryption without any help from a computer, and she must encrypt the word 'HELLO' for me. I could ask her to instead of typing the real keys, that she always ...
34 views

### Security of simple Skein PBKDF mentioned in the paper

From the Skein 1.3 paper section 4.8, Skein as a Password-Based Key Derivation Function (PBKDF), it mentions the following as a simple PBKDF (S = seed and P = password): An even simpler PBKDF is ...
77 views

### Is this an example of a zero knowlege proof?

My Math Structures professor mentioned the strange concept of a zero knowledge proof to me after class one day, and I decided to do some reading about it. After reading the relatively famous "How to ...
89 views

### Is it safe to prefix the a key with a known value?

Almost every encryption algorithm is based on a secret key. I wonder when the algorithm is considered safe, does that also imply that I can prefix (or suffix) the key with a known value, as long as ...
58 views

### Creating a new cipher! [closed]

http://flashbackcipher.blogspot.ae/2015/03/introducing-flashback.html Hey guys the above is the blog for a new cipher, if you guys can take a look and suggest problems.. it would be of great help!! ...
376 views

### RC4 , Is it possible to find the key if we know the plaintext and ciphertext?

Is it possible to find the key if we know the plaintext and ciphertext with RC4. How should I write the algorithm?
83 views

### How dangerous is it to encrypt with AES 256 if the end user knows the unencrypted value?

I am implementing a bit of security in a system that was originally built without encryption on a specific piece of data. The plan was to encrypt this piece of data and include it as part of the ...
3k views

### Encrypting small values with RSA private key

I'm looking for best practices when it comes to encrypting small (< 128 bytes) amounts of data with the RSA private key. Signing it would make the resulting payload too large.
271 views

### What is the most light-weight symmetric cipher thats still usefull?

I need a very light encryption scheme which costs almost no performance during encryption (while decryption may be slow). I found 5 algorithms: RC4, DES, LED, PRESENT, and Piccolo. But how do I ...
121 views

### MAC in SSH packet encryption, benefits to not including it?

What are the benefits to not including MAC in a SSH packet encryption? I understand what the MAC is there for, but if it was not included would there be an advantage? Is the MAC somewhat redundant ...
62 views

### Do asymmetric signatures require constant-time verification?

To avoid a timing attack, HMAC signatures are usually compared in constant-time (every byte is compared, and the results aggregated). Is the same necessary for asymmetric signature algorithms such ...
207 views

### What happens when a RC4 stream gets corrupted?

I want to encrypt a large file using RC4. But what happens if the encrypted file gets corrupted (bytes modified or lost)? Can I still decrypt the rest of the file correctly? If not, what is the best ...
36 views

### Determining nonce between unsynced systems

It's my first venture into cryptography, and I'm struggling with how to use a nonce in an encryption standard between two digital radios. The two radios support AES encryption, only requiring a ...
109 views

### Deciphering text encrypted with a changing cipher

I know there are many ways to crack basic ciphers were each letter is mapped to some other letter, but what ways are there to decode something that was encrypted using a cipher that changed after ...
88 views

### HMAC tag to verify the key (verification in the reverse direction)

A quick question. Are there any problems with the following HMAC use-case: We have two entities ($A$ and $B$), both of them have a secret ($A$ has $S_0$ and $B$ has $S_1$) $A$ generates a random ...
194 views

### ECDSA for encryption

ECDSA keys are much shorter than RSA keys, but typically only used for signing, not encryption. Is there an accepted way of doing this? (https://bitcointalk.org/index.php?topic=196378.0 ...
306 views

### Deterministically generate a RSA public/private key pair from a passphrase (with sufficient entropy)?

Is it possible to deterministically generate public/private RSA key pairs from passphrases? Would giving the (key generating) algorithm data made from key-stretching the passphrase (instead of a ...
348 views

### Secret sharing scheme with possibility to change the secret

Here's a scenario I want to handle with a secret sharing scheme: Alice wants to share the secret $S$ with Bob, Charlie and Dave. Alice generates private shares based on $S$ for Bob, Charlie and ...
196 views

### Can we reverse a hash when we know part of the input?

While I read that hashes are not meant to be reversible, but assuming we have part/half of the message/input of a hash? Is there any method that we can use to recover the remaining message via this ...
1k views

### Why are RSA key sizes almost always a power of two?

I know that other bit sizes are possible, e.g. this HTTPS server seems to have a 9000 bit key https://www.ssllabs.com/ssltest/analyze.html?d=qqq.gg, but it's very rare that one sees a key not of size ...
186 views

### Concatenation of two strong hashes may have striking weakness

For any hash functions $H_0$ and $H_1$, it is easily proved that their concatenation $H_0\|H_1$, defined by $(H_0\|H_1)(X)=H_0(X)\|H_1(X)$, is at least as resistant as the strongest of $H_0$ and $H_1$ ...
561 views

As everyone is now aware, Mt Gox has declared bankruptcy. As what appears to be the very last thing they did, Mt Gox accepted my $35 and fulfilled my special Mt Gox Yubikey. Having just arrived in the ... 0answers 53 views ### Composition of non-perfect encryption keys Definition 1: A key$k$is called perfect if it is uniformly distributed from the adversary's point of view; a key$k$is called$ε$-perfect, if its distribution has an$ε$trace (statistical) ... 4answers 771 views ### Creating a small number from a random octet string I'm trying to figure out the best way to generate a cryptographically secure random number between 0 and 200 (inclusive) from a cryptographically secure random string of bytes (ie. read from ... 1answer 747 views ### How would one crack a weak but unknown encryption protocol? I asked a question on security.stackexchange, but was told it would be a better fit here: http://security.stackexchange.com/questions/32779/how-would-one-crack-a-weak-but-unknown-encryption-protocol ... 2answers 76 views ### Applying Trapdoor Function directly to plaintext Suppose we have a secure trapdoor function defined on (G, F, F^-1) where G is a randomized algorithm outputs a key pair (pk, sk). Why would this trapdoor function become insecure if we apply F ... 0answers 68 views ### Making PRFs out of PRGs Is it possible that we take a$PRGG(k)$of stretch$n\cdot2^n$, and read its output as the table of a$PRFF(K)$with input and output size of$n\$? Intuitively it sounds possible however I read ...
144 views

I have an embedded device. It produces larges files (200 MB). I want the device to encrypt the file before writing to disk, so I gave them all a 16-byte random key. How can I transform the large ...
31 views

### Practical strength of non-2^n RSA key lengths [duplicate]

It has for many years been popular to use RSA keys that have lengths that are powers of two. E.g. 1024-bit, 2048-bit and 4096-bit key lengths are all popular for use with OpenPGP implementations such ...
30 views

### Weaknesses of truncated hash value [duplicate]

I want to apply one of SHA-2 functions to a plain text and then truncate the hash value into parts and store them into different areas so are there any security implications for truncating the hash ...
35 views

### I was wondering if RSA is an homomorphic crypto system? [duplicate]

I was wondering if RSA is homomorphic and how secure is it. I have read there is a variable of this but i don't fully understand the mathematics.
28 views

### Is RSA-OAEP secure when e=3? [duplicate]

Is RSA-OAEP secure when the exponent is equal to 3?