# All Questions

635 views

### Is ECB mode safe to use with RSA encryption? [duplicate]

Firstly, bear with me, I'm relatively new to cryptography. In a recent static analysis scan of our application, one of the findings complained that we are using ECB: A mode of operation of a block ...
106 views

### Can I use the output from a DRBG directly as K for AES, or do I need to use a key generator algorithm?

NIST has 3 validated "Recommendation for Random Number Generation Using Deterministic Random Bit Generators" (DRBG's) that are based on NIST SP 800-90A: Hash_DRBG (based on hash functions) ...
85 views

### What do these notations mean in the definition of Perfect Secrecy, if we read those in English?

If m: message, M: message space, k: key, K: keyspace, c: cipher, C: cipher space and $E_k$: encryption function, such that $E_k(m) = c,\ m,m^* \in M,\ k\in K,\ c\in C.$ Then, what do the following ...
124 views

### Does perfect secrecy imply uniform ciphertext distribution?

I suspect the answer is no, but I am not able to either prove it, or provide an example. In Katz and Lindell's book, it is only said that with a perfectly secret encryption scheme, the plain and ...
140 views

### Of what use is my code for finding prime numbers of a certain size?

I've developed a bit of Mathematica code that can find primes within a range of numbers. For example, if I wanted all the primes between one million and two million, it could do that. Of what use is ...
141 views

### Is creating a own protocol safe or should TLS always be used?

The more I start to learn about cryptography the more I hear it is unsafe to 'create' your own cryptographic protocol. With this I mean combining cryptographic primitives like HMAC, AES and RSA ...
113 views

### Defence against timing attacks

I know this is a difficult subject but would a good defense against timing attacks be not sending a message if the decryption or authentication fails? So if the attacker provides a wrong HMAC for ...
130 views

### How difficult is it to get a key using simple XOR

Recently someone gave me an algorithm as follows: XOR = Key XOR Random1 XOR Random2. They think that in order for someone to extract "Key" from XOR they would need Random1 and Random2.. but looking ...
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 ...
144 views

### Simplified Example of ECC to use in the classroom

I have come up with the following rudimentary example of how ECC relates to asymmetric keys. Is this a valid explanation of ECC and its relationship to asymmetry? To only be deciphered by the person ...
165 views

### Difference between Pseudorandom Function vs randomly chosen function

I am currently going through a course in cryptography. In this, I stumbled upon Pseudorandom Functions. I got a little idea of Pseudorandom Generators which map an input string (key) to an extended ...
253 views

### Significance of 3mod4 in squares and square roots mod n?

Why do most literature while discussing squares or square root modulo a prime P, consider P to be congruent to 3 mod 4?
132 views