All Questions

916 views

Why is it OK for secretbox to leak the message length?

Most block cipher implementations expect users to pad so that the message matches the cipher block size. I understand the purpose of the padding is to make the input match the cipher block size. It ...
524 views

What is the most secure encryption algorithm to encrypt my password database?

The password manager I use lets me choose an algorithm from the list below in order to encrypt my password database: Microsoft Base Cryptographic Provider v1.0: RC2-128 RC4-128 DES-56 3DES TWO KEY-...
2k views

Is there an existing cryptography algorithm / method that both encrypts AND compresses text?

So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. For example, if I encrypted ninechars, the ideal result ...
118 views

What is the meaning of probabilistic encryption algorithm?

I am learning cryptography by myself and I am not able to understand the meaning of probabilistic encryption algorithms. How is it different from deterministic encryption algorithms ? How can the ...
164 views

Triple DES as cryptographic hash function

I need to generate a hash for a small piece of data (~50 bytes). I'd normally use MD5 or SHA but that's not available in the platform I'm programming for. Luckily, it provides Triple DES and I ...
76 views

SSL implementation in windows? [closed]

SSL (Secure Socket Layer). windows Webbroswers ( Chrome, Mozilla, Edge, explorer ) are using which winapi set to Encrypt and Decrypt Data. SSL is asymmetric encryption. So which Api set is being used ...
125 views

How is wpa2 authentication structured

I would like to understand the cryptography behind Wpa2. As far as I know, there are 4 messages on the 4-way handshake and three of them are values concatenated with hashes. First, I am trying to ...
343 views

Deciphering “easy” ciphers without hints

I've been keen on IT Security for a long time now and I've learned a lot about networking & security. However trying a "decryption challenge" I'm lacking what I think is basic encryption/...
80 views

Output of using the same key in all 3 boxes of 3DES

I am trying to figure this one out: What would be the encrypted output for an input x if the same key K is used in all three boxes of 3DES? The encryption scheme for 3DES with three different keys, ...
111 views

Solving Vigenére with unknown alphabet

I'm trying to decrypt a cipher that I suppose has been encrypted with Vigenére. However I came about the following thought: The cipher consists of characters from [...
48 views

Is frequency analysis a viable attack on non-text data encoded by substitution?

Is frequency analysis a viable attack on non-text data encoded by substitution (eg image and audio formats encoded with a substitution cipher)?
107 views

How can I multiply an additively homomorphic encrypted value by a float number?

As we all know, if $E()$ is an additively homomorphic encryption, we can multiply $E(a)$ by an integer $b$, then we will get $E(ab)$. But what if $a$ is a float number? Can we still get $E(ab)$? Which ...
37 views

Deriving a Set of Seeds from a Seed

I need a set of seeds $S=\{s_1,..., s_n\}$, for pseudo-random function where seed $s_i$ is used to generate a set of pseudo-random values. Obviously I need to be able to regenerate the sets of pseudo-...
186 views

How to prove that a commitment hides the decryption of an ElGamal ciphertext?

I've decided to remove a previous unanswered question of mine and break it down into smaller pieces so it's not such a loaded question. For this question I need to prove that I've committed to a ...
134 views

Can the round function $F$ in a Feistel Network be practically any non-invertible function?

This question might seem silly, but how true is the fact that the round function $F$ does not have to be invertible? I am curious to know this, because non-invertible functions can be very lossy, i.e....
72 views

Designing Secure Multi-Party Computation Sub-Protocols Based on Homomorphic Encryption

When designing SMPC protocols using secret-sharing, it is a common approach to compose a protocol from several sub-protocols (each proven secure under the formal definition of security w.r.t. semi-...
672 views

Toy hash algorithm that can be broken

I'm looking for a toy hash function, where the idea is to have high school students break (i.e. find a collision) a hash function by hand, in order to teach them how one way functions and hashing ...
73 views

Discrete Logarithm problem with inverse

Let $\mathbb G$ be a cyclic group of order $q$. The Discrete Logarithm Problem (DLP) is, given $g, g^x \in \mathbb G$, to compute $x \in \mathbb Z_q$. I'm interested to know if there is a known ...
13 views

Transforming EC public key X and Y-sign into X and Y [duplicate]

I'm using bouncycastle which uses X and Y coordinates for public keys. An EC public key is more compactly represented by the X coordinate and the sign of the Y coordinate. How do I use bouncycastle ...
41 views

Proving the security of a one-way function with partially known input

Let's say we have a construction like in this question: We have a OWF $h(.)$, a secret salt TXT, and a counter starting at 1, and we compute ...
85 views

Collision likelihood from /dev/urandom for VMs using the same underlying hardware

We have multiple virtual machines sharing the same physical hardware. We use /dev/urandom for session key generation. But a question comes up: if ...
62 views

Need help implementing key management scheme

Scheme has following requirements Client application should perform encryption/decryption using component 1, component 2 and ZPK (zone PIN key. Client should get this key from host in encrypted form)...
845 views

What Diffie-Hellman parameters should I use?

After reading this article, I started wondering how should I approach the problem of choosing p and g params in 1024-bit Diffie-Hellman key exchange. In my project, I am going to establish keys ...
143 views

Statistical saturation attack on block ciphers

I was wondering if anyone around here could give me some explanation on this type of attacks. Pretty much the only thing that I could find is A Statistical Saturation Attack against the Block Cipher ...
209 views

Why have round constants in hashes?

This may seem like basic crypto knowledge, but why do hash functions like SHA-2 and Whirlpool have round constants that are absorbed into their respective states? I can understand that in a cipher ...
182 views

Can it ever be impossible to invert a PRNG?

I've read about the possibility of inverting the Mersenne Twister after 624 numbers of output. 624 matches the state size of my implementation of the Twister. Coincidence? If the generator only ...
287 views

Why calculate pi to estimate randomness?

Why do testing suites calculate $\pi$ (pi) using the Monte Carlo method to determine if a series of numbers are random? As far as I can tell, the Monte Carlo method can be used to estimate $\pi$ ...
287 views

Is there a difference between asking for a signature and asking for a decryption in challenge-response authentication?

Consider the following two authentication schemes. In both cases the server knows a public key of the client (for a signature system in the first and an encryption system in the second case). Scheme ...