# All Questions

60 views

### Bit commitment, two blobs with same bit, without revealing it?

Suppose we have bit commitment scheme: $n=p*q$ and $t \in QNR_n$, with Jacobi $(\frac{t}{n})=1$ Commitment(P), random $x\in \mathbb{Z}_n$, $y=x^2t^b$, where $b$ is bit. Ok, suppose we have $y_1$ and ...
167 views

### Should I remove these use cases of MD5/SHA1 from my program?

I have a web app (a register and login system) written already but i am now improving it. One of its design goals was high security. I have some use cases of md5 and sha1 in it and now i am in doubt ...
1k 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?
295 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 ...
384 views

### Multiple keys for the same ciphertext [duplicate]

Say you have a plain text: How are you today? and you encrypt it so it becomes: LKD03Loel03skj1Q03 Now you have multiple people that need to know the plain text of this cipher text but ...
67 views

### Why is it a quadratic equation?

In Groth-Sahai NIZK proof system, they have defined something called Quadratic Equation in $\mathbb{Z}_n$ as shown below. But, my idea of quadratic equation was a second order polynomial equation in a ...
113 views

### RSA: How effective is this keypair-trash attack [duplicate]

A question that could very well be part of xkcd's "what if?": Let's say Monica made a piece of software that sends all RSA keypairs to a central database after they're not used anymore. Something ...
53 views

### With wrong IV at receiver side, the CFB in better than OFB?

Assume the receiver have a wrong IV (initialization vector), in the CFB mode only the first block of plaintext is wrong but in OFB mode the second and all blocks will be affected. Is that correct? ...
94 views

### Should the nonce passed to GCM be authenticated?

This answer recommends authenticating the IV with HMAC when using AES and then HMAC. Since AES-GCM provides authentication too, should the external nonce passed to GCM be authenticated separately ...
414 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 ...
672 views

### Is RSA with SHA1 broken?

I am using CryptSignMessage to sign a string/file. Is using RSASha1 insecure? I know Sha1 is broken as a hashing algorithm, but does that also mean that using it for signing with RSA is broken?
212 views

### Is the DES F-function injective for a given subkey?

Is it possible for two different half-block inputs to the DES F-function, with the same round subkey, to produce the same output? That is, if we feed two different half-block inputs $b_1$ and $b_2$ ...
566 views

### Find private exponent in RSA [duplicate]

The other answers for this confuse me, I know the principle of d in terms of the equation it has to satisfy. However I'm not sure how I would go about finding the private exponent without trial and ...
112 views

### how to represent message as an integer between $1$ and $n-1$ [closed]

I am trying to implement simple El-Gamal cryptosystem. And I can't understand how to represent message as an integer between $1$ and $n-1$. The only thing that comes to my mind is: if $n$ bit length ...
184 views

### How does chosen ciphertext attack on Elgamal work?

Can it be proven that attacker can obtain the full message if he knows some plain-ciphertext pairs?
278 views

### Why do we need to compute message digest of a message first while signing it?

Why it is more efficient to compute a message digest of message and digitally sign it then, rather than sign the message directly?
237 views

### Is it possible to decrypt the entire message with one half of the key in this example?

In this scheme, a 256 bit key is split into two 128 bit sub-keys. Message blocks are 256 bits and are also split into two sub-blocks. Before encryption, each sub-block is xor'd with it's partner and ...
93 views

### Showing that $2^{N-1}\equiv1\pmod N$ when $N=2^p-1$ for prime $p$

I got this question on a previous exam and I got it wrong. I've gone back through it several times since then, but I can't seem to get it. I would really like to know how to do it, so if someone could ...
81 views

### Complexity of preimage resistance

Why is the complexity of pre-image resistance $2$ raised to the power of $n$? I have been looking in everything lecture about pre-image resistance, but I still didn't know the answer.
126 views

### How to figure out the size of the output of a cryptographic checksum function

There is such a putting in Bishop's Introduction to computer security, page 118 as following: Definition 8–2. A cryptographic checksum function (also called a strong hash function or a strong one-...
81 views

### public key certificate on TLS/SSL

Currently I am working on a public key certificate. I got a question: Why is a public key certificate needed for TLS/SSL? Wouldn't TLS/SSL itself is enough? What is the role of the certificate?
157 views

90 views

### How to calculate kinv from the given k value

I am implementing an ECDSA NIST test vectors verification application. The test vectors are taken from http://csrc.nist.gov/groups/STM/cavp/#09. One of the test vectors is given below: ...
226 views

### Elliptic curve group over a prime finite field $F_p$

If $p$ is a big prime, and the elliptic curve $E$ is defined over $F_p$ by the equation $y^2=x^3+ax+b$ where $a,b\in F_p$. The point on $E/F_p$ together with the infinite point $\mathcal{O}$ form a ...
59 views

### Is the product of two primes only factorisable by those two primes? [closed]

The question is as per the subject line. Does the fundamental theorem of arithmetic imply (prove?) that if I multiply two primes, then those two primes are the only factors of the product? I.e. 17 x ...
453 views

### How can we prove that two discrete logarithms are equal?

Suppose there are two elements $a = g^x$ and $b = h^x$, where $g$ and $h$ are generators in $Z^*_p$ and $p$ is a large prime. How can we prove that $a$ and $b$ have the same discrete logarithms with ...
185 views

### IV = Filename XOR CipherKey?

i want to encrypt transparently using Rijndael. So this is, what I thought of and I would like to have an opinion from "Experts" whether this will harm encryption strenght. I am using chunks of 1MB ...
244 views

### Thoughts on secure hashing and the “mds” algorithm

Almost a decade ago Raymond Chen blogged [1] about the "hash reset attack" cautioning developers to record the content length in addition to the message digest. Recently I came up with a variation on ...
1k views

### Decrypt AES-128 with key file but missing IV? [duplicate]

I want to decrypt a file that has been encrypted using AES-128 in CBC mode using OpenSSL. I got the “.key” file – which is 32 digits – but when I try to decrypt with OpenSSL, the program asks me for “-...
410 views

### HKDF vs TLS PRF. Which of the one is better? [closed]

Which of the one (HKDF or TLS1.1+ PRF) is more secure and why?
127 views

### Is it possible to use structures other than finite fields?

I have some difficulties to understand why we are using finite fields in cryptography. Why do we use field? Why not ring or group? Is that really necessary that the field is finite? Why not real ...
3k views

### ECC key size and signature size

My understanding of ECDSA signature length is that it depends on the key size. So for instance, if a "prime256v1" is used, the signature length will be 64 because (n/8)*2 and for "secp384r1" it will ...
248 views

### How to store keys for a cascading encryption?

What is the best way to implement a cascade encryption? I'm trying to figure out how to cipher a string (or message) using Serpent-Twofish-AES and then store the keys. I'll provide an explanation, ...
117 views

### Explicit Key SHA-1

I'm reading “Collision-Resistant Hashing? Towards Making UOWHFs Practical” and in the Section 2 it says: Hash functions like MD5 or SHA-1 have no explicit key. But no notion of collision-...
176 views

### Distributed Asymmetric Key Decryption with threshold

Threshold decryption of public key encryption schemes allows the decryption key to be distributed among trustees. Then, to decrypt the cipher text it requires at least threshold t trustees to run the ...
369 views

### What does the cipher-text overhead means?

I have two questions here. What does the cipher-text overhead means? Why we were suggested not to encrypts the plain-text itself instead just encrypts only the key (i.e random number)
189 views

### The security of the AES secret itself

I am writing an application, running on a server, where multiple users access data from a database which is AES encrypted with a master secret. The master secret itself is initially randomly generated,...
147 views

### what actually the function for e(g,g)^xy

I doing a project using ABE "Attribute-Based-Encryption" but i didn't understand what actually the function for $e(g,g)^xy$. Just tell what's the calculation need to perform here. I gone through no of ...
176 views

### What key length is required to keep simple keyed “hash” secure?

In a previous question, I described a particular keyed "hash" that mapped a 5-digit input code into a 5-digit output code. It used a 8-bit key which is very insecure - more than 99% of the time, you ...
454 views

### Perfect Secrecy, two Definitions

I'm reading the proof of the implication "Def 2.1 $\Rightarrow$ Def 2.4" in these slides about Adversarial Indistinguishability and Perfectly-Secret Encryption. I have a doubt in the slide 10. Here it ...
155 views

### Physical Level Encryption

What types of algorithms that are capable of signing a message are out there that run on a physical level, e.g. lacking the infrastructure of a standard PC, no memory, processor or motherboard in the ...
1k views

### How to calculate cycles per byte [duplicate]

Sometimes, websites and scientific papers that introduce and/or handle cryptographic algorithms also provide speed-analysis and tables comparing the individual performance of cryptographic ...
80 views

### How to hash a structure that needs to include that hash's outcome?

so I am busy writing a TCP protocol in which I send a "packet header" with each packet of data. This packet header is a structure that contains information about the data that was sent. I want to ...
727 views

### Ciphertext-only attack on Simplified DES

Is it possible to deduce the plaintext block or the key, given only a Simplified-DES ciphertext block (e.g. c=01110110)? I'm reading Cryptography And Network Security, by William Stallings and I'm bit ...
3k views

### How does the rand() function in C work? [closed]

I want to know how rand() works (even when I don't provide any seed how it produces PRNs?) thanks!
Suppose that $p$ is a safe prime of 2048 bits ($p = 2q + 1$, and $q$ is prime). Suppose that one is given two pairs $(x_1, y_1)$ and $(x_2, y_2)$ such that: $y_1 = x_1^{r_1} \pmod p$ \$y_2 = x_2^{r_2}...