# All Questions

1answer
2k views

### Why does OpenSSL append extra bytes when encrypting with aes-128-ecb?

Plaintext: Attack at dawn!! Hex: 41747461636b206174206461776e2121 Key: ...
2answers
310 views

### Two-dimensional S-Box

Consider the following simple cipher: $$c_1 = S(m_1 \oplus k_1) \oplus k_2$$ Where $S$ is S-box, $m_1$ - 16-bit plain text, $k_1$ and $k_2$ is two parts of 16-bit key. If S-box is standard then this ...
2answers
114 views

### How to use HKDF to combine two keys

I have heard that to combine two keys HKDF is better than using XOR function. But if you look at the HKDF RFC I could not figure out how to use it for concatenating two keys. What I can see is HKDF ...
1answer
81 views

### Using HMAC to secure a “widget”

Let's say I have a web "widget" that a customer could include on their website. They would include the widget by adding an iframe that points to a URL on my site. I want to ensure that my widget can ...
3answers
8k views

### Why is public-key encryption so much less efficient than secret-key encryption?

I'm currently reading Cryptography Engineering. After giving a high level explanation of the difference between secret-key encryption and public-key encryption, the book says: So why do we bother ...
1answer
179 views

### Off-the-record communication

Is my protocol correct? For fun, I tried to design a protocol that would allow off-the-record communication. I'm not sure it works, I have a feeling there might be a problem with it that I'm not ...
1answer
583 views

### Why are the lower 3 bits of curve25519/ed25519 secret keys cleared during creation?

I am currently experimenting with ed25519 and I noticed that on secret key creation, bit 254 is always set and the lower 3 bits are always cleared. I found that bit 254 is always set to protect ...
3answers
255 views

### Digital identification using steganography, can it be broken?

Digital identification using steganography, can it be broken? I have read a few articles saying that using an I.D. embedded in video, audio, etc can help track down the origin of a copyright ...
1answer
107 views

### Proof of shared secret through key derivation

Alice gives a random key $K$ (e.g. 32 bytes long) to Bob through a secure channel. Bob want to prove to Alice through an unsecured channel that he knows the key. Is it secure for Bob to send ...
1answer
141 views

### Security Level Estimate when Cascading/Compositing Ciphers?

Way back when, DES had a theoretical security level 56-bits. 2-key TDEA provides about 80-bits of security, and 3-key TDEA provides about 112-bits of security. Obviously, those security levels are not ...
1answer
207 views

### How to prove that a ciphertext is encrypting multiplication of two values?

Zero-knowledge proofs with soundness, completness and zero-knowledge enable a prover to convince a verifier that a witness validates successfully a predicate without giving any information about the ...
2answers
285 views

### Why is time-lapse cryptography not popular?

Time-Lapse Cryptography has been introduced by Michael Rabin and Christopher Thorpe in the paper “Time-Lapse Cryptography”, but it does not seems to be popular. It is a really good paper with an great ...
1answer
272 views

### Blinding twice in RSA

I understand that if you have a message $m$, you can blind it by selecting a random $r$ and then multiplying $r^e\times m \pmod{n}$ Someone else then signs it with $d$, raising to the power of $d$: ...
1answer
94 views

### Can I use the cipher text ouput of only one DES rotation as plaintext to check validity?

I have made a python code for one DES rotation. Can I use the resulting cipher text as a plain text for the same rotation with the same key? I think the answer is no, I can't do so. But I need to be ...
1answer
115 views

### Difference between computational and statistical indistinguishabilities

What is the difference between the two notions of computational and statistical indistinguishability?
1answer
76 views

### Dependence on Keyed Hash Function

I'm reading the paper “Collision-Resistant Hashing? Towards Making UOWHFs Practical” which states: With an ACR hash function $F$ the key $K$ is announced and the adversary wins if she manages to ...
1answer
62 views

### order between adversaries and type of resources given

We have a game $G0$ for which an adversary $A$ has access to a certain amount of ressources. Let us suppose that the maximum advantage for the adversary to win this game is $Adv_{G0}$. If we modify ...
3answers
905 views

### Hash function based on pseudorandom functions and security

Are there hash functions that make use of pseudorandom functions. Precisely, I'm looking for a specification of a hash function based on PRF (and based on the security of such a primitive).
1answer
270 views

### A situation where security by obscurity might be the best solution - or am I wrong?

Imagine the following situation. There is an application for a microcontroller-driven system. The profits are made from manufacturing and selling the device itself. However, it is expected, that the ...
2answers
182 views

### Acceptable assumptions when proving security

Considering the output of a cryptographic primitive, like an encryption scheme (CBC, ...), a hash function or even the output of any schemes based on number theoretic assumptions, is it reasonable ...
2answers
546 views

### Secure use-cases of block cipher with 64-bit block size

In what cases can we use a weak block cipher like DES ? More precisely, Are there specific situation in which a weaken block cipher can still be used, for instance for certain types of plaintext ?
2answers
208 views

### Have these compositions of block ciphers the same security?

I'm interested by the compositions of the block cipher DES, instantiated with independent keys $k_1$, $k_2$ and $k_3$. Are these 3 compositions equivalent in terms of security? ...
1answer
1k views

### Good entropy source for generating openssl keys

I need to generate a CA (4096-bit RSA) and server keys for openvpn and I want them to be "top quality". Here is my plan: gather entropy from multiple sources (saving individual files): FreeBSD ...
2answers
582 views

### Is there a practical zero-knowledge proof for this special discrete log equation?

We have a multiplicative cyclic group $G$ with generators $g$ and $h$, as in El Gamal. Assume $G$ is a subgroup of $(\mathbb{Z}/n\mathbb{Z})^*$. There are two parties, Alice and Bob: Alice knows: ...
1answer
905 views

### Can you help me understand the Common Modulus Attack in a Lucas Group?

I'm trying to decrypt a message that is encrypted using a LUC encryption scheme and running into roadblocks. I know that with RSA if Alice and Bob use the same public modulus but different encryption ...
1answer
63 views

### Oblivious Transfer where neither party learns the index of the message

In a traditional Oblivious Transfer setting, the sender has a list $(x_1, x_2, ... , x_n) \in G$ where $G$ is the chosen group. The receiver has $b \in \mathbb{N}$, such that engaging in the protocol ...
1answer
162 views

### Stream vs Block cipher: Synchronising and the receiver

I am learning cryptography at school and I was wondering: How are the blocks/streams after decryption synchronized at the receiver to form one long meaningful message? Am I right by saying that ...
2answers
379 views

### Why do these Python XTEA implementations require different deltas?

I once needed to an XTEA snippet to from C++ to Python and it did not work properly. I then found a function on ActiveState.com and noticed that it looks almost exactly like mine, with one exception - ...
1answer
467 views

### RSA Encryption and Signature - Weak Padding

Assume that I have an plaintext $m$ and it is padded with $randompad||00||m$ and then it is encrypted with RSA and a public encryption key so we get the encrypted $Sm$. Then to assure its integrity ...
1answer
116 views

### What parts of number theory does the RSA algorithm use?

It is said that the RSA algorithm uses number theory. What parts of number theory does it use? I know it uses modular arithmetic and Euler's totient theorem and function. Is that all?
1answer
211 views

### Solve a Modular Exponentiation

It might be common, but if we had to solve an equation like this $m=s^{e}$ mod $n$ where $m,e,n$ are known. How can we find $s$. What optimisations could be applied? And what would the complexity of ...
1answer
318 views

### Single Party Encryption, Multi Party Decryption

I am looking for an adequate protocol for public key decryption, which would allow $n$ parties to jointly decrypt a cipher text. The usage scenario for such a protocol would be a mixnet that wouldn't ...
1answer
617 views

### Forgery Attack Against RSA Digital Signature

I have been reading about attacks against RSA Digital Signature in a book The attacker chooses the signature first and then computes the message. As a consequence, he cannot control the ...
1answer
195 views

### How does a backdoor in the RNG enable an attacker to break encryption protocols?

I'm wondering how a backdoor in a random-number generator (as rumored the NSA have placed), actually compromises the security of things like VPNs or TSL/SSL. What I understand is that, if such a ...
1answer
128 views

### With Encrypt-then-MAC, and flexible protocols, do I need to authenticate the authentication?

Sorry, the question is not easy to state (or wasn't for me, anyhow). So I'm writing a very flexible format for security. It allows for full choice of cipher, key size, and so on, along with key ...
1answer
199 views

### Outsourcing arbitrary computations securely

Consider the following scheme. Alice wants Bob to make some computations for her, but she doesn't want to reveal the data on which he's going to do it. So, she encrypts the data, sends them to Bob, he ...
2answers
119 views

### What's the alternative should PKI collapse?

Premises - please check it and critique if necessary: If factoring the products of large numbers suddenly becomes simple, PKI goes up in smoke. Is this correct? If it is correct, it seems to me ...
2answers
4k views

### With OpenSSL and ECDHE, how to show the actual curve being used?

Using openssl s_client -host myserver.net -port 443 I can see the cipher negotiated is indeed using ECDHE for session key ...
2answers
1k views

### How many possible input files are there who's length can be stored in 63-bits?

I'm trying to calculate how many possible combinations of files there can be using a signed 64-bit file length, but can't seem to find a formula (or I'm using the wrong keywords). For example, the ...
1answer
438 views

### ECB weakness and its exploitation

Lets say that I have a server which encrypts information at the server side using ECB mode with the blocksize of 16. If the server appends data that I control with a secret and sends back the ...
1answer
256 views

### How can uniformity of hash functions (e.g. SHA-256) be proved?

In reading about the Bitcoin protocol I noticed how much its proofs-of-work apparently depend on uniformity of the SHA-256 hash function. And so presumably do many other applications. How do ...
2answers
151 views

### Is there a name for this 'enhanced' caeser shift and if so, is it trivial to break?

This cipher shifts the letter that it will shift to, after each shift... I used to play with this when I was a kid. I was thinking about it recently and realized that it wasn't as simple as I ...
2answers
567 views

### Using IV buffer after altered inside a Rijndael CBC Encryption/Decryption process as IV for next message?

When sending a block to be decrypted or encrypted, with RijndaelCBC, we input the data to decrypt/encrypt and an IV for syncing and to prevent identical outputs for identical inputs. This question is ...
1answer
123 views

### Calculate entropy of key derived from PBKF2 function

I am using PBKF2 to derive a encryption key from a password. suppose entropy of my password is y and my PBKF2 function has x number of iterations. So how to calculate the entropy of finale key derived ...
2answers
119 views

### Is this algorithm demonstrating “proof of work”

Is this algorithm demonstrating proof of work? This is a algorithm where a "token" is combined with a time stamp and then a cryptographic hash is generated from the combination, next the objective is ...
1answer
1k views

### Is it possible to generate an RSA SHA1 signature only from a public key?

Is it possible to generate signature only from Public key. See example below where i have valid signature but what if I change hash ? Is then any way to do this? Public key(160 bytes): ...
2answers
173 views

### Diffie-Hellman insecure on addition modulo $n$

Assume that the group $G$ is the set $\mathbb{Z}_{n} = \{0,\ldots, n-1\}$ for a 1024 bit integer and $+$ is addition modulo $n$. Then why would Diffie-Hellman key exchange in this group be insecure?
1answer
408 views

### Guessing encryption algorithm based on key and ciphertext

Is it possible to tell which encryption algorithm was used, assuming I have a key and a encrypted text? To not complicate the situation let assume we are speaking about symmetric algorithms only. ...
2answers
503 views

### RSA Signature Weak Padding Attack

Assume that we have a message $m$ of size $n$, and it is padded with two 01 bytes in front. Then the signature $s$ is computed using a private key $ks$. Can we ...
1answer
575 views

### Pollard’s Rho Method

I can't get my head around Pollard’s Rho Method for solving discrate log problem I have read in a book: The basic idea is to pseudorandomly generate group elements of the form α^i · β^j ...

15 30 50 per page