# All Questions

112 views

### What can a master password also be called?

When having a company computer that is full disk encrypted, it is common that the boss have a master password / backdoor, so the data always can be decrypted. I have heard some call this for "scrow" ...
163 views

### Does a break in a collision resistance property of a hash function by definition implies an attack at the first pre-image attack?

Is there a formal security proof in the shape of reduction that states that if an attacker manages to break the collision resistance property of a cryptographic hash function (a random oracle) he will ...
91 views

### Initialization value (IV) bit error

When a bit error happens in an IV, what would the result of decrypting a cipher-text be in the different encryption modes like ECB, CBC, CFB, OFB, and CTR?
83 views

### find solutions that solve the equations

I am implementing a timing attack on RSA for school and I need to generate two sets of messages $Y$ and $Z$ for which holds: $(Y^d \mod N) \cdot Y < N$ and $(Z^d \mod N) \cdot Z > N$ where ...
1k views

### AES GCM symmetric encryption of data at rest in c#, ciphertext much longer than plaintext

I've written encryption/decryption routines using AES GCM. Code can be found here. I recently realized that the cipher text is longer than I believe it should be. It should add the tag and IV onto ...
782 views

### Is it possible to use the RSA algorithm, or a variant, for software licensing?

I'm almost a newbie about RSA encryption, so my question could it be banal. I'm beginning to create a licensing system for my software. I need to distribute a crypted license file to many customers. I ...
389 views

### How can encryption involve randomness?

If an encryption algorithm is meant to convert a string to another string which can then be decrypted back to the original, how could this process involve any randomness? Surely it has to be ...
386 views

### Complexity of ECB and OFB

What is the complexity of ECB in terms of Time and Memory? and also in OFB? I can't find it in the internet, so I decided to ask it in here.
179 views

### CPA distinguisher for matrix multiplication in GF(256) with randomized padding

What is the best CPA distinguisher for the function $F_k:\{0,1\}^{8n}\to\{0,1\}^{16n}$ described below? Let $E_k$ be a $2n\times2n$ matrix with elements in $GF(2^8)$, selected by generating bit ...
229 views

### BigInteger in Java and Randomness

I'm looking for some PRNGs and – as I have been using Java for a long period of time – I thought that the BitInteger class, together with the ...
995 views

### suggestions for cryptography projects for an ece 3rd year student

I am an electronics and communication engg student currently doing my 3rd year second semester. i am interested in info coding and the security aspects of it. As an ECE student i want to know what is ...
542 views

### Creating a hash of XOR'd blocks

Suppose a message $m$ is divided into blocks of length $160$ bits: $m > = M_1 || M_2 || ... || M_l$ And define $h(m) = M_1 \oplus M_2 \oplus ... \oplus M_l$ Which of the three desirable ...
83 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 ...
90 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 ...
105 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 ...
81 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 ...
120 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 ...
197 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 ...
109 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 ...
224 views

### Attack an stream cypher using 2 XORed LFSRs

We know that the Key were generated by 2 16Bit LFSRs (output of both is XORed together -> key) I already extracted a 64 Bit key sequence, but how can I calculate the polynom of the LFSRs (and the ...
141 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?
112 views

2k views

### Why is Triple DES not vulnerable to meet in the middle attacks?

Consider the Triple DES encryption calculated as: $$C= E_{K_1}(D_{K_2}(E_{K_1}(P))).$$ For a chosen plaintext attack, given plaintext $P$, we compute the result of $D_{K_2}(E_{K_1}(P))$ and store ...
104 views

### About using mistakes as part of a code

Could a code be developed where one uses intentional errors say in english, as a text to encode? For example someone might have a message 'Agent X must report to station 5'. This could be distorted ...
919 views

### Why do some block cipher modes of operation only use encryption while others use both encryption and decryption?

In Chapter 6, Question 6.8, of his book “Cryptography and Network Security Principles and Practices”, William Stalling asks: Why do some block cipher modes of operation only use encryption while ...
162 views

### Encrypting the same message using different schemes

$E_1$ and $E_2$ are IND-CPA secure encryption schemes. $E$ is defined as: $k_1,k_2 \leftarrow K_1 \times K_2$ . $E_{k_1,k_2}(m) \leftarrow E_{1,k_1}(m)||E_{2,k_2}(m)$. Hope the notations are in an ...
78 views

### How does the key size per data bit influence the security?

The likelihood of breaking, for instance, an AES-128 cipher is 100% after $2^{128}$ tries in brute force, meaning that I've got to try $2^{128}$ keys to certainly break it. What if I (hypothetically) ...
152 views

### 64 bit Elliptic Curve key?

For a simple proof of concept project i'm (attempting!) to do, i've started looking into openSSL elliptic curve cryptography. However instead of the standard key lengths, 160-512. I'm interested in ...
1k views

### How does TLS generate the shared secret?

From many readings, I got to know that TLS generates master shared secrets using pre-master keys and uses the DH algorithm to generate the shared secret/Master secret. What values during the hello ...
88 views

### Does a cofactor of an elliptic curve have to be an integer?

What are the implications of a curve having a non-integer co-factor for its generator point? Is that even possible?
351 views

### Encrypting firmware with AES and no IV [closed]

I have an embedded device with a AES CBC engine on it that is used to ensure the integrity of the firmware. I know that CBC mode requires unique IVs to be any good, but I'm unsure if it makes a large ...
227 views

### Hash 22 byte secret into 512 bit hash: Full entropy?

Does it make sense to hash a 22 byte secret (which may not have full entropy since it is chosen by the user) into a 512 bit hash (using Keccak-512)? More precisely, will the 512 bit hash have full ...
135 views

### Decryption honeypots

When performing a key search, I've always wondered how you reliably detect a successful decryption once you hit the right key. I assume that you have to analyze the data and look for patterns: words, ...
353 views

### Where is my private key stored when I communicate to a website that uses SSL/TLS?

If I communicate with a website that uses SSL/TLS, my browser will generate a private key. Would the browser store that key on the hard disk or would store just it in the RAM?