# All Questions

134 views

### Are all binary-additive stream ciphers reciprocal?

I'm writing a thesis focused on Maurer's provably-secure stream cipher. Long story short, this cipher works by expanding a short key into a long keystream and then XORring this keystream with the ...
187 views

### What is the difference between order of base point and curve order in EC? [duplicate]

When I was read about the elliptic curve cryptography I found some definition about domain parameter of elliptic curve like the follow. But I did not understand something $p$: prime number. $a, b$: ...
149 views

### Is there a Javascript and Java implementation of a good CSPRNG [closed]

I need to use a cryptographically secure pseudo random number generator in my client running Javascript and in my server running Java. Is there a well-known implementation of a good CSPRNG in both ...
255 views

### Availability of a simple limited PRNG algorithm

I am in need of a really simple limited PRNG, that either exists or can easily be created in virtually any language on any platform. It takes only the initial seed, and is only expected to generate a ...
864 views

### Elliptic curves for ECDSA

I'm trying to implement parameters generation for ECDSA according to SEC1 v2.0: ...
171 views

### AES - Encrypting multiple blocks of files

On my site, users can download files which are stored on public hosting, so I need to encrypt them. A downloaded file is divided into blocks of 1 kB and I want encrypt them individually, using the ...
655 views

### How to perform frequency analysis of a substitution cipher using a Base64 alphabet

Let's imagine a cipher that works like the following: Plaintext is encoded to Base64. The characters in the encoded plaintext are substituted with a randomly shuffled character set(A-z, 0-9, -, _, =)...
680 views

827 views

### BruteForcer XOR (bfxor.exe) to attack 64-bit keys and longer

First of all, this is not a beginner's question since I already know a good deal about encryption and brute-force attacks. This is also no question on how to code programs for brute-force attacks ...
143 views

### Where have all the cypherpunks gone?

In 1992, cypherpunks was created as a mailing list for activists advocating for cryptography. Arguably, the cypherpunks mailing list was the foundation for the movement and the centre of it all. ...
200 views

### Secure Multiparty Sum in malicious model using threshold encryption

Suppose $n$ actors each hold a plaintext $p_i$. We wish to find $\sum p_i$, without leaking any information about individual $p_i$. Any actor (or any link in the network) could be controlled by an ...
68 views

### special public keys and modulo n

I just picked up cryptography and have some questions on RSA cryptosystem: Say there are two public keys (n, e1), (n, e2), e1 is coprime to e2. They share the same n. Is it possible to find the ...
166 views

### Do data-dependent rotations have any advantage over fixed rotations?

There are many ARX ciphers, however most use fixed rotations. I know data-dependent compared to fixed rotations are: patented harder to implement constant time more expensive in hardware harder to ...
2k views

### Is it possible to determine a PGP public key from encrypted data?

Is it possible to find out which public key was used to generate the message? Scenario is like this : I got data which is encrypted with a public key. Now a "bad guy" hast the encrypted data, and ...
323 views

### What does $\Pi$ represent in cryptography?

I am doing a project in cryptography and while reading a tag generation algorithm for files, I got stuck with the meaning of $\Pi$. The screenshot of the algorithm is inserted below. Here the ...
89 views

### Elliptic curve trapdoor function without modular arithmetic?

From what I understand, an elliptic contains a set points satisfying the equation $y^2=x^3 + ax + b$ together with the point at infity. It seems clear how multiplication with a scalar and a point ...
129 views

### How well does breaking multiple DH key exchanges over the same group scale?

Suppose you are running a server with the Diffie-Hellman parameters (so the group G and generator g) generated once. There are ...
158 views

### CP-ABE: structure of the secret key SK

I am working on Ciphertext-Policy Attribute based Encryption (CP-ABE) and I need to understand how a secret key looks like. For example, assume that the universe of attributes is defined to be {A,B,C,...
12k views

### Impacts of not using RSA exponent of 65537

This RFC says the RSA Exponent should be 65537. Why is that number recommended and what are the theoretical and practical impacts & risks of making that number higher or lower? What are the ...
60 views

### what does rsaSha512Sign do?

I have the following function: ...
143 views

### plaintext distribution ,perfect secrecy cryptosystem

I have been trying to solve the next problem: let pi be a perfect secrecy cryptosystem with specific plaintext probability distribution. How to prove pi will have perfect secrecy for all other ...
931 views

### Collision resistant hash functions

Let (Gen1,H1) and (Gen2,H2) be two hash functions. Define (Gen,H) so that Gen runs Gen1 and Gen2 to obtain keys s1 and s2, respectively. Then define Hs1,s2(x)=Hs1(x)||Hs2(x). a) Prove that if at ...
103 views

### Many single-time use keys encryption scheme (not Shamir's Shared Secret)

I'm looking for encryption scheme with the following properties: There's a sequence of keys that can be used to decrypt the message Strictly only one key from the sequence is required to decrypt the ...
1k views

### How does GPG verify succesful decryption?

How does GPG (or other programs using the OpenPGP file format) verify that it has succeeded with decryption (for symmetrically encrypted data)? Is something appended to the clear text so there exist ...
219 views

### Zero Knowledge Example using discrete log

I've been exploring Zero Knowledge Proofs and while the classic cave example by Jean-Jacques Quisquater makes sense, I find the discrete log example problematic. Since the Verifier is given p, g and ...
194 views

### Key generation in Digital Signature Algorithm

In DSA, one needs to generate two primes $p$ and $q$ such that $q$ is $256$-bit and $p$ is $3072$-bit and $p-1$ is a multiple of $q$. Question: How to generate such $p$ and $q$. Attempt: First, use ...
130 views

### CCA security of a system that splits messages and encrypts each packet

Propose a symmetric key based crypto-system for implementing a secure email system. This system is based on AES and CCA secure. Suppose that you have to encrypt a large message and that this message ...
117 views

### Checking both Quadratic residuosity and Jacobi symbol simultaneously and efficiently

I have to randomly generate a number $u$ such that $u \in J(N)-Q(N)$ where $J(N)$ denotes the set of elements less than $N$, whose Jacobi symbol value is equal to 1; and $Q(N)$ denotes the set of ...
378 views

### OpenSSL RSA same plaintext but different ciphertext

how OpenSSL RSA work ? I generate public (n,e) and private key (n,d) then I encypted a file by : ...
479 views

### Why sorting is needed for Meet-in-the-middle attack

The weakness of double DES, E (k1, E(k2, M)) is that Meet-in-the-middle attack is possible. When performing Meet-in-the-middle ...
591 views

### What is the most computationally efficient way of generating pseudo-random permutations?

I have an application in which I need to create up to J randomly shuffled-copies of an array of length N. Then I will have millions or even billions of iterations such that, in each iteration, I will ...
336 views

### Are all block ciphers FPE (format preserving encryption)?

A FPE preserves the format. There is a correspondence between the format of the ciphertext and the plaintext. Given that a message in some binary enconded format can easily be divded in some ...
311 views

### Implementation and Testing of SRP-6a

I have been wracking my brain trying to develop a functioning implementation of SRP-6a in Python to use with a 3rd-party API that claims to use SRP-6a with $N=$ 2048-bit prime and generator of $2$. ...
120 views

### How many of primitive point on the elliptic curve?

In elliptic curves for cryptography, I know $nG=O$, where $G$ is a base point represented by $G=(x_g,y_g)\ on\ E(F_P)$, where $n$ is Order of point $G$. For example, $P(0,6)$ is a primitive point on ...
112 views

### Complexity to find an preimage of a hash function

Suppose a hash function based on Merkle-Damguard construction. Its compression function is given as $H_i=E_{m_i}(H_{i-1})$, where $E_{m_i}()$ denotes the encryption of an ideal block cipher with $n$-...
2k views

### Perfectly secret cipher can leak about the key?

As defined by Shannon, a cipher is perfectly secure if ciphertext leaks no information about the plain text. Under this definition, can ciphertext leak something about the key? Are there any ciphers ...
295 views

### Key derivation for AES-Encryption key and HMAC

Okay so I have two options for how I would derive two keys for AES encryption and HMAC they are as follows: Run BCrypt on a users passphrase and then use the bouncy castle implementation of HKDF in ...
365 views

### How can CBC-MAC be secure when message length is fixed?

I was doing some self-initiated knowledge gathering about digests, signatures and hmacs and I ran across the fact that you can use CBC as a MAC, but if the message size is not fixed; then it is not ...
380 views