# All Questions

1answer
248 views

### What does it mean when two encrypted files, encrypted with the same method but with different keys, when xor'd together, produce a repeating pattern?

Let's say I have fileA and fileB, both encrypted somehow, but in the same method with different keys. If I xor them together, they will make a repeating pattern of 32 bytes length. What does that ...
3answers
1k views

### How vulnerable is the C rand() in public cryptography protocols?

I just learned about the basics of public cryptography a few weeks ago and I am curious as to why the C rand() function should not be used for crypto schemes. For example, say I want to generate a ...
1answer
146 views

### Constants Differ in SHA1 implementation

I am trying to understand why the constants differ in this SHA1 implementation: https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/sha1.js ...
1answer
428 views

### Decrypting a small Message using RSA with a Private Key [closed]

If I have a private key of (43, 341). What would be the steps I need to take to decrypt a small message using RSA? I have looked ...
1answer
311 views

### One time pad: why is it useless in practice?

The symmetric cryptosystem One time pad (OTP) seems to be very beautiful since it is perfectly secret according to Shannon. Many books, however, point out that the main drawback is that one must ...
1answer
178 views

### Using Stream Cipher as CSPRNG

Are there any guidelines or justification for converting a stream cipher algorithm for use as a CSPRNG? For instance, lets say I wanted to convert one of the eStream portfolio Profile 1 (software) ...
1answer
84 views

### Do Chosen-Chiphertext attacks only apply to public-key cryptosystems?

Do Chosen-Chiphertext attacks (CCA-1/2) only apply to public-key Cryptosystem?
1answer
122 views

### Is ElGamal still unforgable if the adversary knows r

Is ElGamal still unforgable if the adversary knows the value of $r$ that was calculated by $g^k$? When we do sign the message $msg$, we calculate $r = g^k$. As we know the regular ElGamal ...
1answer
177 views

### The relationship between the key length and encrypt time in Xor algorithm?

I did work on the encryption algorithm and the decryption using the XOR method noticed that when more the key length, the less time spent on encryption and decryption. I have two questions in ...
1answer
158 views

1answer
76 views

### Composing hashes and/or MACs

Suppose I have n hash/MAC functions, of which n-1 are extremely insecure, leaving only one that is in fact cryptographically secure. If I use all of them on a message and the XOR them together the ...
0answers
46 views

### Is anyone aware of Du atallah multiplicative secret sharing scheme for dot products for > 2 party scenario?

I am working on Du Atallah's multiplicative secret sharing scheme for more than 2 party scenario. Is anyone aware of its multiparty version (more than 2 parties). The paper for 2 party can be found ...
1answer
97 views

### Existence of a map $\phi:\mathbb{Z}_{N^2}^* \mapsto \mathbb{F}$

Is there a map between the group of $\mathbb{Z}_{N^2}^*$ where $N$ is a composite number , a product of two equal size secure prime numbers $p$ and $q$ and a finite field $\mathbb{F}$, such that for ...
1answer
254 views

### SSL-like protocol with public-key hard-coded in the client

Imagine a SSL-like protocol that instead of using certificates signed by a trusted CA, has the server's public key hard-coded in the client. My question is: what happens if the server's private key is ...
1answer
275 views

### How can I convert numbers into prime numbers?

I'm working with one-way accumulators, but I'm not knowledgable in cryptography. Is there an easy peasy way to hash numbers (or whatever) into prime numbers? Obviously I'd like it to be collision ...
1answer
97 views

### Has there ever been more then a theortetical difference between preimage resistance and second preimage resistance?

In other words, has there ever been a point in time in which having the content of a message has actually helped break a hash function?
1answer
274 views

### Block cipher and parity of permutation

Can anyone explain the following text passage to me? Most real-world block ciphers build even permutations, because it's hard to build odd ones using small operations (32 bit) on larger (128 ...
1answer
63 views

### Positioning of keys in encrypted text

I'm just looking at very simple encryption. I've noticed that the key is typically either at the front or at the back of the encrypted text. This is quite easy to break if you know the key. It can ...
1answer
329 views

### What is a 'secret key factory'? What precisely is it doing? [closed]

I have found a Java implementation of AES CBC mode that runs in Netbeans. The lines below appear to create the key from password and salt: ...
1answer
926 views

### Does IKEv2 protocol have two modes like IKE

IKE Protocol have 2 modes, that modes have different structure. Does IKEv2 protocol have two modes like IKE.
2answers
558 views

### Are there any elliptic curve asymmetric encryption algorithms?

RSA offers the functionality of encrypting (short messages, or symmetric keys) with a public key, and decrypting with a private key. However, RSA key generation is extremely expensive, especially for ...
1answer
79 views

### Exchanging Keyspace and Message space in PRF

Suppose there is a secure PRF $F: K \times X \to Y$. Then is $F': X \times K \to Y$, defined by $F'(x,k):=F(k,x)$, a secure PRF? In my opinion it should be because exchanging the keyspace with ...
2answers
196 views

### does re-encrypting the same value with multiple keys reduce security

I found myself wondering today, how much security is lost if you take a plaintext - assume that its content, including any metadata is unknown to an attacker, for example it may be random data - and ...
2answers
457 views

### Does AES-128 have the same strength as AES-256 with a padded key?

When I use the same 128-bit key for AES-128 and AES-256 with a known/public padding for the latter, is there some weakness in AES-256 that is not present in AES-128 with essentially the same key? ...
2answers
44 views

### How to make sure the pre-agreed information safe for DH-Key Exchange

The definition of DH key exchange was given as the method let two authenticate each other & exchange the crypto key over an insecure channel. DH-key-exchange was innovated to defence ...
1answer
89 views

### In Pedersen Key Distribution, can the public key be persistent?

I am implementing a key distribution protocol described by Torben Pedersen in A Threshold Cryptosystem without a Trusted Party (EUROCRYPT'91). In the protocol, the $n$ parties distribute a public key ...
2answers
919 views

### Are AES-256's related-key weaknesses exploitable if it is used to build a hash?

Assume it is made a hash based on AES-256 encryption (perhaps because this is hardware-accelerated, but no standard hash is); and it is used the Merkle–Damgård structure, that is padding of the ...
1answer
483 views

### How to select $g$ in Paillier Cryptosystem

For my cryptography class project in university I have selected Paillier Cryptosystem as a course project ...
1answer
74 views

### How do they implement MAC in TLS?

I recently read questions about "MAC then Encrypt/Encrypt then MAC" which made me curious about how they actually use the algorithm. MAC only calculated once either case (according to what I read). ...
1answer
143 views

### Sequence of Encrypting RSA like Chaum Blinding scheme

I'd be a noob in cryptography but reading up a little on RSA, I do get some understanding and I want to specifically resolve this issue. UPDATED Lets say we have the following values in place: ...
2answers
198 views

### Perfect Forward Secrecy in TLS

I read that TLS does PFS using Diffie Hellman. However, DH can be used even without certificates - so how is DHE-RSA better than plain DHE? Is DHE a insecure algorithm, that DHE-RSA is needed?
0answers
88 views

1answer
285 views

### Why are collision attacks important when talking about MAC schemes?

I'm reading Ferguson, Schneier, and Kouno's Cryptography Engineering, and it has a section on MACs. It discusses different types of MACs, but it seems to claim that to acheive 128-bit level security, ...
1answer
67 views

### Showing that security of a elgamal invariant is insecure

Original Elgamal signature is defined $S(m, \alpha) = (r, s)$, where $$r = g^k \bmod p$$ $$s = (m – r*α)k^{-1} \bmod (p – 1)$$ more information on Elgamal signature can be found here. Variant ...
2answers
235 views

### Given a message and signature, find a public key that makes the signature valid (ECDSA)

This question is a variant on Given a message and signature, find a public key that makes the signature valid, which discusses the analogous question for RSA. It was suggested to me by this post over ...
2answers
346 views

### security in the standard model → random oracle model?

Can a protocol proved secure in the standard model be considered secure in the random oracle model?
0answers
181 views

### implementing a cryptographic hash with a block cipher [duplicate]

How can a cryptographic hash function be implemented/created using the block cipher? I was wondering if we can use AES in cipher block chaining mode to implement it.
1answer
91 views

### How to keep phi(n) secret in RSA?

As we know, RSA cryptosystem have both private key(a,p,q) and public key(b,n), by chinese remainder theorem and fermat's little theorem, we know that the importance of keep p and q secret, and from ...
1answer
152 views

### How do I express each element in a field F as a power of a primitive element?

I have a field $\mathbb F_{2^4}$, and it is represented as a residue ring of the polynomials over $\mathbb F_2$ modulo the polynomial $\beta^4 + \beta^3 + \beta^2 + \beta + 1$. I want to express ...
0answers
122 views

### How we transfer 128bits cipher to a 4x4 matrix for AES input?

Why the input cipher for AES encryption, can write in 4x4 matrix with 8 bits entires, and can said is 128bits? if each cell is 8bits in binary, how we said this matrix is represent 128bits?
0answers
101 views

### Threshold signatures vs. certificate authority+voting verification

Perhaps a silly question, but I am wondering what the advantages are of threshold signatures. Let's consider the following two signature schemes: $(t,n)$-threshold signature with a trusted dealer, ...
1answer
272 views

### Difference between plain AES CTR and “CCM-style” CTR

I am trying to adapt the following function from SJCL, which does "AES-CCM" style CTR encryption, to do "pure CTR" encryption. I am playing around with SIV and would rather use this well-reviewed ...
1answer
242 views

### Why does this square root algorithm work?

I've been doing some elliptic curve cryptography, and a library I'm using has this slightly bizarre algorithm for computing modular square roots: Let $x$ be some quadratic residue modulo $p$ for some ...

15 30 50 per page