# All Questions

20,516 questions
Filter by
Sorted by
Tagged with
7 views

### From where can i get complete AES encryption source code?

I have been searching many websites for source code of AES whether it is ECB, CBC, CTR or any other method but can't find any. Can anyone please help me in getting the source code? I have to implement ...
24 views

### Do 'nonsequential' PRNGs exist?

It is my understanding that PRNGs typically use a seed and can then generate random values one after the other. This is what I mean by being 'sequential'. How about a PRNG which allows me to retrieve ...
17 views

### TLS handshake with client later on acting as a server

Is it possible that a client which gets the Digital certificate of the Server during the TLS handshake then acts as a server? Because a server only needs to have a valid digital certificate which it ...
43 views

### how to solve discrete logarithm problem information requested

I have seen your example about ecdlp solver :The Problem is as follows: $$E\backslash GF(p):y^2=x^3+17230x+22699$$ where $p=23981$, point $G$ with prime order $|G| = 109$ Alice creates a public key ...
34 views

### Is it good time or too late to start research on blockchain theory in academia? [closed]

Usually, technical things first require research if they are with problems for actual deployment. However, blockchain has started running in the real world application like bitcoin etc., that people ...
37 views

### Concept Question for Secure Computation

I think this should be a simple question and I might be missing something fairly fundamental, but I haven't been able to find the answer. Basically, suppose there are parties $A$ and $B$. Party $A$ ...
14 views

495 views

### In laymans terms, what exactly is a “One time pad”?

Background I am an undergraduate novice learning about cryptography. Recently my professor introduced us to the concept of a "One time pad". According to my professor: A one time pad is a cipher ...
2k views

### Theoretically, what if I were to change some magic numbers in, say, AES?

Purely theoretically. I know it's a bad idea to try to invent your own encryption and that's not the intention here. Just a thought experiment. Say, I change some or all of the magic numbers used in, ...
45 views

### Help understanding syntax used in security proof

I am looking through this paper and am trying to understand the proofs better. One of the theorems the authors are proving (Theorem 5.1) contains syntax of Adv followed by "cdh" in the superscript and ...
5 views

### ValueError: Unable to compute factors p and q from exponent d [migrated]

I created a script that helps me decrypt RSA key but apparently it doesn't work for all public RSA certificates. Here is the code: ...
58 views

### Size of $E$ over $\mathbb{F}_p$ contains $p+1$ points

I am struggling to prove this claim: I proved that the map $x\mapsto x^3+1$ is a bijection from $\mathbb{F}_p$ to itself if we have that $p\equiv 2\bmod{3}$. We have to use this fact to prove that ...
30 views

### How many bits of cryptographic security do these XOR Mid-Square random numbers have?

This pseudo-random number generator uses only XOR and Mid-Square operations: Get one secret 128-bit truly random seed $R_0$ Generate a million secret $R_j$ by the recurrences (for $1\le j\le 1000000$)...
36 views

### How is Diffle Hellman with RSA immune to man in the middle?

Alice and Bob want to exchange keys, Alice sends his half (the public key of the ephemeral key pair) signed with his private key and makes the public key available. Eve is bridging the connection so ...
20 views

### How is a salt used in WPA-PSK PBKDF2 key generation for both sides

I'm just learning about WPA-PSK and d I'm already stuck. My understanding is that both the AP and STA share the PSK, which is generated from PBKDF2 function. Which according to wikipedia is: ...
17 views

### NTRU value 'r' coefficients and degree

On Wikipedia, it says that Alice chooses randomly a polynomial r with small coefficients (not restricted to the set ...
81 views

### Serpent vs AES,, theoretical security

In the lets-choose-the-next-aes contest in 1998, they chose Rijndael because of speed. Now, not taking speed into account, is Serpent more secure or not? Since it has 32 rounds (of course that's not ...
27 views

### Transposition cipher - brute-force-attack - expected value

how do I calculate the expected value of a brute-force-attack on a transposition cipher? For example, for the text "HELLO", there are 5! = 120 possibilities. Is the expected value to break the ...
33 views

### CTF RSA Problem [closed]

I am doing a CTF and I came across a challenge I do not know how to solve. We are given a key generator and asked to find a way to factor the keys $N = pq$ it generates. The intended way is to ...
40 views

### Seed recovery from PRNG [closed]

Lets say i have a list of randomly generated numbers. Example: import random i=1 mn = 1 mx = 2 while i<500: print(random.randint(mn,mx)) i=i+1 Only ...
38 views

### Is there practical Attack on A5/1 Cryptosystem?

There are several and several attacks on A5/1 Cryptosystem, but most of them are impractical. In 2008, Elad Barkan , Eli Biham and Nathan Keller release a practical attack on GSM. Is there any ...
73 views

Let's consider a random variable X that can produce the output $c$ with probability $1/4$. I was told that $-\log_{2}(\frac{1}{4})$ represents the number of bits needed to represent $c$. But, imagine ...
23 views

### Streaming encryption with handshake [closed]

I am writing a protocol that is meant to provide high-speed streaming-encryption for the games I am writing. I would like to avoid a dependency on OpenSSL for licensing reasons, so I am using ...
20 views

### Mac then Encrypt over Encrypt then MAC [duplicate]

Are there advantages between using Mac then Encrypt over Encrypt then MAC?
40 views

### How is the keystream actually generated in AES CTR

I've been trying to find out how the keystream in AES-CTR is generated, but I can't actually figure it out. Wikipedia and any other sites that "explain" it just say the nonce is padded with the ...
31 views

### Question about terminology of public key encryption in practice

I am asking myself the following question: Say Alice sets all things up so that she is the reciever in an RSA-system. What do you call this "network" now? I hope it is clear what I mean. I ...
37 views

### Error propagation in CBC [duplicate]

I am doing an error propagation experiment with the CBC mode.I have encrypted a 100 byte text file with openssl. I made the 55th bytes of my encrypted file corrupted.As per theory the corresponding ...
40 views

### How is a public key able to verify a signature from the corresponding private key?

I understand how public/private keys can be used to 1- sign data of some sort with a private key, resulting in a signed document. 2 - Verify using the corresponding public key that the signed ...
36 views

### one-pass deterministic authenticated encryption

suppose there is a router with limited storage but good network connection; it could be a good worker for deterministic authenticated encryption on streams; that means it receives data from another ...
63 views

### Appropriate public exponent choice for RSA encryption

From what I understand, we can arbitrarily choose an exponent e as long as $\gcd(e,\phi(n)) =1$. But what is the most appropriate choice for it? Should it be small compared to $\phi(n)$ or approach ...
36 views

### Verify if a prime number was accumulated

If a trusted administrator generates RSA accumulator $A$ as: $$A = g^{x_1 x_2 \cdots x_k} \bmod N$$ where $N=pq$, $p$ and $q$ are both prime numbers and all $x_i$ are also prime numbers. How can a ...
64 views

### Requirements for RSA key parameters

Recently I'm working with a chinese vendor for POS devices and their devices use 2048bit RSA keys for signing binaries. I had to generate a public/private pair (so I can sign my own binaries) and I ...
38 views

### How to evaluate the security of transposition ciphers?

how to evaluate the security of transposition ciphers? I am specifically interested in the security of turning grilles and how to (mathematically) evaluate their security. I would appreciate any help....
41 views

### Security of secure two-party computation with a trusted dealer during offline phase?

In the SecureML paper, one can assume that two non-colluding servers can run secure two-party computation protocol based on secret sharing with the help of a third party (client). The client would ...
41 views

### 128 bit AES CBC bit flipping on second block

I have a 128 bit AES cipher in CBC Mode with the IV prepended to the message. I am aware of the security issues here, but that is exactly the point of my example. I would like to change the plain text ...
40 views

### openssl encryption salt length

when i was reading the latest source code of openssl, i found openssl enc has an 8-byte (64-bit) salt length; because the same ...
24 views

### Compute shared public keys

I want to compute, in a distributed way, the following shared public keys on an elliptic curve: $(xG, x^2G,...,x^nG)$, being $x$ a secret scalar that no single party knows, $G$ the public ...
228 views

### Operation on elliptic curves

Let $Y = xG$ be a point on an elliptic curve, $G$ the generator point and $x$ a scalar. Without knowing $x$, is it possible to calculate $x^nG$, being $n$ a natural number?
17 views

### Default RNG used by openssl for certificate generation [duplicate]

I have generated a certificate using openssl with the below command. ...
44 views

### Sponge with PRF instead of PRP

In most uses of Sponge mode of operations such as SHA3 and many of the round-2 candidates in the NIST lightweight cryptography project, the underlaying primitive is a cryptographic permutation - that ...
34 views

### What is degree of state bits and how do i count it?

in the this paper,section 3,autors attack hamsi-256.Also they explain the weakness that are exploited.Im not so good at math,and also not native english speacker, so i dont understand term "degree of ...
37 views

### Why is this attack complexity equal that exact number of bit operations?

in the this paper,section 3,autors attack hamsi-256. Im trying to make a parametrized version, so i need to understand how do they estimate the complexity of attack in bit operations,that reads as ...
111 views

### Is the role of public key/private key determined arbitrarily or mathematically?

I have read about conflicting information about the roles of public/private keys. In one article(Asymmetrical-key algorithms), it says: Simply put each party, say Alice, picks a private random ...
87 views

### Discrete Logarithm: Given a p, what does it mean to find the discrete logarithm of x to base y?

My understanding is that $a^b \bmod p$ is the discrete logarithm problem. Given the question is worded this way, are we trying to find $\log_y x \bmod p$. For instance, if we are trying to compute ...
44 views

### Question about a proof in Junod's paper about the Blum-Blum-Shub generator

I am reading Junod's paper about the Blum-Blum-Shub generator. There is one thing I just do not understand about his proof of Lemma 4. On page 17 he writes: We conclude that $x=-x_0$ and from ...
### Can anybody please explain why is the probabilty of finding a desired message for random chaining values equal $2^{-224}$?
Can someone explain why does probability is equal $2^{-224}$ in the following piece of paper? The length of messages blocks in Hamsi is equal 32 and the length of chaining values is equal 256.