# All Questions

18,890 questions
11 views

### Small solutions to modular arithmetic linear congruence

Let $p$ be a prime number with $N$ bits, let $a,b,c$ be constants. The problem is to find solutions to the equivalent $a x + b y \equiv c \pmod p$ with both having at most $N/2$ bits. What ...
21 views

### Does a regularly reseeded PRNG provide backtracking resistance?

I'm currently discussing a security topic with some of my classmates. A cryptographic PRNG typically provides backtracking resistance if an adversary that compromises the internal PRNG state cannot ...
11 views

### Generate a per data shared secret vs per session

I have read about SSL that they persist the shared-secret for the entire session. However, someone in stackoverflow suggested a way of generating a shared secret for each data to send and then send ...
16 views

### What are limitations of Universally Composable (UC) framework?

I am beginning to read some UC framework papers, and I guess it is similar to the simulation-based security analysis. I can understand the main advantage of UC is to assist us to analyze the ...
17 views

### Does this equation hold in a bilinear map?

I would like to verify whether or not the following equation holds: $e(a,c)^{c1\cdot c2\cdot c3}e(b,c)^{c1\cdot c2\cdot c4}==e(a,c)^{c2\cdot c3}e(b,c)^{c1^2\cdot c2\cdot c4}$ for appropriately ...
8 views

### How to prevent accidental nonce reuse with AEAD cipher

I'm trying to correctly implement ChaCha20-Poly1305 in my node.js app (...crypto is hard). I understand that the cipher requires a unique key/nonce pair for each message or the security breaks down. ...
602 views

### Symmetric Encryption in the P=NP world

I expected to find answers along the lines of quantum-computing insight into attacking AES; however, answers on this question aren't applicable because "Quantum computers give a quadratic speedup on a ...
25 views

### Does it make any difference when salting database passwords with Random vs SecureRandom?

I want to salt database passwords and then compute the hash but I wonder if I should use Random or SecureRandom? From an attacker perspective would it be easy to break if Random is used or ...
32 views

### Finding a prime field with n-th roots of unity

How can I find the smallest prime $p$, such that field $GF(p)$ has $n$-th roots of unity? For example, I know that for $p=2^{256} - 351 \times 2^{32} + 1$ there exit roots of unity for $n=2^{32}$. ...
34 views

29 views

### Encrypt multiple RSA keys with same passphrase

I have to create and store a bunch of RSA key pairs with openssl. The private keys will be encrypted with the aes256 option and a very long, random password. Would it be safe to use the same password ...
527 views

### Are there any symmetric cryptosystems based on computational complexity assumptions?

Are there any symmetric cryptosystems which are provably secure in the sense that there exists a reduction from their security to the hardness of some underlying hard problem such as integer ...
16 views

### Question about using Montgomery form for elliptic curve operations on bls12-381

Since the prime for bls12-381 is not of a form to allow easy modular reduction , is the best approach to use the Montgomery multiplication + reduction algorithm? ...
44 views

### Understanding token security

I am having some problems, cryptographically speaking, digesting this information. There is a table that seems to say that tokens provide "end to end security" (I suppose we understand different ...
48 views

### DH prime size required to force an attack of $2^N$ steps

Why the size of a DH prime $p$ should be about 6800 bits long to force an attacker to perform $2^{128}$ steps to attack the system? How is this relationship 6800-128 established?
12 views

### Counter block problem using aes-ctr decrypt from pycryptodome [migrated]

So I am trying to decrypt a connection over SSH using pycryptodome. I have the key and the IV extracted from memory (I am working inside a virtual environment), which are 100% correct, which were used ...
57 views

### Password hashing alogirthm simple enough to implement myself?

I'm doing a password manager for a school project and I need to hash the master password for verification but I also need to write the hashing algorithm myself. However, most the algorithms I've come ...
29 views

### Performance evaluation in terms of Boolean operations

How can I conduct a performance evaluation in terms of Boolean operations for an access policy which supports them? Could someone explain this to me in simple terms or suggest some specific reading?
41 views

### Hamming distance in xor decryption

I've been working on cryptopals 1.6, breaking xor and have got it working. I found this answer that explains why hamming distance works and I think after some thinking I believe I'm starting to ...
23 views

### Convert a plain public key to PEM format [on hold]

I plan to generate an EC key pair using P-256v1 from a trusted application and export the public key to Normal OS. The public key will either be in plain format or have none (only key hex). The ...