instruction stringlengths 15 30k |
|---|
Assume the following: I want to cast a vote during an election through an electronic voting system. For our system we make the assumption that the device one uses to cast the vote is potentially compromised and will tell a third party how one votes.
Now we allow any out of band preparations before the election begin... |
During electronic voting, how does one hide the choice from Voting device? |
Is it mandatory to include PKCS#7 data (OID 1.2.840.113549.1.7.1) octet string into the sequence of PKCS#7 signed data?
I mean if you want to sign PDF, you are basically adding PKCS#7 container inside the document. And if the PCKS#7 signed data contains the whole data that was signed, that doubles the lenght of the ... |
I read some where in crypto.stackexchange answer (related to EC-SRP protocol) that there is pattern in points on elliptic curves, i.e. if given some points containing mix of correct and wrong points and all points are less than prime number (p), now my question is:
is it possible to identify the correct points if s... |
Is there any pattern in points on EC? |
I'm confused about ECDH. Using their public keys and private keys, two entities can arrive on a shared secret. But from the equations I've seen, it looks like ONLY the numbers present in their key pairs are used to do this, so it would seem that if the shared secret is compromised, then they that particular pair of key... |
Is only one shared secret generated by ECDH per key pair? |
First, RSA "encrypt with private key" and "decrypt with public key" are semantically wrong; these don't provide confidentiality which is the purpose of encryption, but they can provide integrity which is the purpose of **signature**.
The fact that RSA sign/verify operations are mathematically similar to encrypt/decryp... |
Is computing roots moduli a composite $N$ a hard problem without knowing the factorization of $N$? |
Suppose that we are given $\mathbb{Z}_{N^2}^*$ and an element $x^u \in \mathbb{Z}_{N^2}^*$ with $u \in (0,2l]$ where $l$ is the bit-size of $N$. Is it difficult to recover $x$ by knowing $u$ without knowing the factorization of $N$? |
If I have 48 random bytes, is it safe to encrypt them using ECB mode? Or is there still a good reason to use another mode like CTR, CBC, etc.? |
Is it safe to encrypt random data using ECB mode? |
I read some where in crypto.stackexchange answer (related to EC-SRP protocol) that there is pattern in points on elliptic curves, i.e. if given some points containing mix of correct and wrong points and all points are less than prime number (p), now my question is:
is it possible to identify the correct points if s... |
Suppose that we are given $\mathbb{Z}_{N}$ and an element $x^u \in \mathbb{Z}_{N}$ with $u \in (0,l]$ where $l$ is the bit-size of $N$. Is it difficult to recover $x$ by knowing $u$ without knowing the factorization of $N$? |
From my basic understanding that all values of x coordinate can't satisfy elliptic curve equation i.e. some x coordinate values are not valid points on curve because if computation of x^3+ax+b for a given x value is not a square.
Therefore, I would like to know that the average/approximate difference (d) in value be... |
Average/approximate difference in value between valid consecutive x coordinate numbers in ECC? |
From my basic understanding not all values of $x$ coordinates can satisfy a given elliptic curve equation, i.e. some $x$ coordinate values are not valid points on the curve because $x^3+ax+b$ is not a square.
Therefore, I would like to know what the average/approximate difference $d$ in value between any two **valid... |
Average/approximate difference in value between valid consecutive $x$ coordinates in ECC? |
I wonder if you can help me figure out that question:
Is there a known probability function f: N -> [0,1], that computes the probability of a sha256 collision for a certain amount of values to be hashed? The values might fulfill some simplicity characteristics to reduce the complexity of the problem e.g. all of them... |
I wonder if you can help me figure out that question:
Is there a known probability function f: N -> [0,1], that computes the probability of a sha256 collision for a certain amount of values to be hashed? The values might fulfill some simplicity characteristics to reduce the complexity of the problem e.g. all of them... |
I'm trying to understand PPT and in particular what the differences are in uniform and non-uniform PPT's. First, this is how I see it:
A Probabilistic Polynomial-Time algorithm A is an algorithm that runs in polynomial time but also have access to some oracle which provides true random bits. So if we input $x$ into ... |
If I have 48 random bytes, is it safe to encrypt them using ECB mode? Or is there still a good reason to use another mode like CTR, CBC, etc.?
Context is this: I am creating something like a TLS session ticket where the master secret is encrypted using a server side key and sent down to the client.
I will still u... |
I'm just getting an overview of some of the concepts in key exchanging at the moment, and I'm a bit disoriented on a few topics, namely key stretching, key derivation functions and perfect forward secrecy.
Regarding key stretching, I understand the idea is to make it more difficult to brute-force a password, but the... |
i am using diffie helman key exchange to generate the shared secret. But how will the message be encrypted using this shared key?
any idea or code snippets in python? |
how to encypt messages using ecdh? |
I'm just getting an overview of some of the concepts in key exchanging at the moment, and I'm a bit disoriented on a few topics, namely key stretching, key derivation functions and perfect forward secrecy.
Regarding key stretching, I understand the idea is to make it more difficult to brute-force a password, but the... |
I recently learned how differential cryptanalysis works, and decided to have a play around with testing various designs for resistance against attack.
My testing algorithm is essentially to loop through all $A$ and $B$ values for all potential input differentials ($\Delta A$ or $\Delta B$), and count how many distin... |
What makes this mixer function resistant to differential cryptanalysis? |
Here is a plain question, all filled with pseudo-real data :)
1. We have a string: "hello" and two keys for AES: GoodKey and BadKey.
2. We encrypt our string with GoodKey, and receive something like "lehho".
3. What will happen if we try to decrypt "lehho" with BadKey? Will decryption algorithm make no sense at... |
I am using Diffie-Helman key exchange to generate the shared secret. But how will can a message be encrypted using this shared key? |
I hope this is the correct place to post this, else I'm sorry.
According to the OpenSSL Legality's section it states:
> OR EVEN JUST COMMUNICATING TECHNICAL DETAILS ABOUT CRYPTOGRAPHY
> SOFTWARE IS ILLEGAL IN SOME PARTS OF THE WORLD
I am wondering what parts of the world are you not allowed to talk about the... |
In what country's am I now allowed to talk about technical details of cryptography? |
I hope this is the correct place to post this, otherwise I'm sorry.
The OpenSSL Legality section states:
> OR EVEN JUST COMMUNICATING TECHNICAL DETAILS ABOUT CRYPTOGRAPHY
> SOFTWARE IS ILLEGAL IN SOME PARTS OF THE WORLD
I am wondering in which parts of the world you not allowed to talk about the technical de... |
In what countries am I now allowed to talk about technical details of cryptography? |
We've been trying to produce a valid, and pretty, MD5. Something that has repeating digits, or spells a word, or something. It's probably more difficult than spelling out the dictionary on a calculator whilst standing on your head on top of a washing machine on ship in the arctic but it's always made me curious.
Ar... |
Are there any valid, and person readable, checksums possible? |
we know that blind computation, Secure Multi-Party Computation, secure circuit evaluation and homomorphic encryption all can prosess the encrypted data,but i am puzzled by them. what are their differences? |
By my math, if you are inputting all possible 17 byte values, and the output is 16 bytes long, then there must always be 256 possible inputs that will result in each output hashsum. However, looking at some rainbow tables, it seems that either this isn't the case, or (more likely) the rainbow tables were incomplete. Bu... |
Will there always be 256 collisions for the output of the MD5 hashsum function for 17-byte inputs? |
Your math is wrong — not the numerical calculation, but your interpretation of it. There are $256^{17}$ possible inputs and $256^{16}$ possible outputs. **On average**, there are $256$ inputs for each output. But there are no guarantees that this is the case for all outputs: it's in fact overwhelmingly likely that some... |
I was monitoring web traffic from my Android mobile using Man in the middle proxy. I installed certificate signed from my server in my mobile and I could see all applications sending sensitive information like passwords as clear text. I understand that SSL protocol takes care of establishing secure communication, but t... |
No need to encrpt data for https? |
Your math is wrong — not the numerical calculation, but your interpretation of it. There are $256^{17}$ possible inputs and $256^{16}$ possible outputs. **On average**, there are $256$ inputs for each output. But there are no guarantees that this is the case for all outputs: it's in fact overwhelmingly likely that some... |
I was monitoring web traffic from my Android mobile using Man in the middle proxy. I installed certificate signed from my server in my mobile and I could see all applications sending sensitive information like passwords as clear text.
I understand that SSL protocol takes care of establishing secure communication, bu... |
Is there a need to encrypt data when send over https? |
We know that Blind Computation, Secure Multi-Party Computation, Secure Circuit Evaluation and Homomorphic Encryption all can process the encrypted data, but I am puzzled by them. What are their differences? |
In an ideal block cipher, what size key would be required for a 32-bit block size? |
For an ideal block cipher, what size key would be required when the cipher has a 32-bit block size? |
> Is there a need to encrypt data when send over https?
*Maybe,* but it would not be practical for widespread consumer use.
In order for this extra encryption to be effective against MiTM attacks, the client and server would already have had to agreed upon a pre shared secret out of band.
|
I've found this attack to be poorly documented, all-in-all. Below is a technical explanation of the matter, or one can skip to the conclusion if uninterested in the details.
# Dual_EC_DRBG
First, let me give a short description of Dual_EC_DRBG using the notation of Shumow and Ferguson (see [the presentation](http:/... |
I need to crack one of the example of linear congruential generator.
I have Xn+1 = (A * Xn + B) mod m
and i know every other word in output sequence:
..., 3158, ..., 1888, ..., 1285, ..., 1744, ..., 253, ..., 722, ...
The question is how to get generator parameters (a,b,m) ?
I have read http://security.sta... |
When a stream cipher is used and a keystream is generated to be XOR'ed with the plaintext, is the keystream sent with the ciphertext so that the receiver knows how to decrypt it? Or does the receiver(s) need to already know the keystream?
Absolute noobie to cryptography. |
Is the keystream transmitted with the ciphertext when a stream cipher is used? |
I need to crack one of the example of linear congruential generator.
I have $X_n+1 = (a \cdot X_n + b) \bmod m$
and I know every other word in the output sequence:
..., 3158, ..., 1888, ..., 1285, ..., 1744, ..., 253, ..., 722, ...
The question is how to get the generator parameters ($a$, $b$, $m$) ?
I hav... |
The keystream is as long as the message, so you don't want to send that to the receiver. The keystream is generated by a much shorter key (e.g., 128-bit private key). That is what the receiver needs in order to decrypt the message.
So, how do you get that to the receiver? Well, clearly you can't just send it in the ... |
I need to crack one of the example of linear congruential generator.
I have $X_{n+1} = (a \cdot X_n + b) \bmod m$
and I know every other word in the output sequence:
..., 3158, ..., 1888, ..., 1285, ..., 1744, ..., 253, ..., 722, ...
The question is how to get the generator parameters ($a$, $b$, $m$) ?
I h... |
Here is my situation. I'm working with an application for which uses hashing to authenticate data.
I have a string, which is hashed. It is, like in a hash length extension attack, H(key:known_value)
This hash is incremented by a nonce upon repeated attempts. On the first attempt there is no nonce, further attempt... |
Solve a problem, thought it was hash length extension, hours later, am I wrong? |
From your picture I deduce that $A$ and $B$ are both 8 bits.
So this construction can be seen as a $16 \times 8$ bit S-box (not bijective). The fact that it's not square is probably what is causing confusion.
Usually, for SPNs, invertible S-boxes are used. Non-invertible S-boxes are less common, but they certainly ha... |
As far as I know, there are three standard options for the three keys $K_1$, $K_2$ and $K_3$ used by 3DES:
1. Three distinct keys.
2. The first and last key are equal: $K_1$ = $K_3$.
3. Three equal keys: $K_1 = K_2 = K_3$
I wonder whether there is a way to find out which one of these options is (most likely)... |
Working on a project testing a hash that protects some data, and I've already eliminated hash length extension attacks as a possible point of compromise, and I'm trying to educate myself on all the variables.
Say I have some data that is hashed via SHA1 - will knowing parts of that hash (the end piece - basically a ... |
Will ANY prior knowledge assist in determining contents of a SHA1 hash? |
I am working on a project testing a hash that protects some data, and I've already eliminated hash length extension attacks as a possible point of compromise, and I'm trying to educate myself on all the variables.
Say I have some data that is hashed via SHA1 - will knowing parts of that hash (the end piece - basical... |
I studyed aboud SSL/TSL and learned that client and server must share keys below.
- common key for enctryption
- common key for generating message authentication code
Then, in SSl/TSL, a client doesn't send these keys to server directly, but it sends pre master secret and generates keys from it.
This is why? |
What is the purpose of pre master secret in SSL/TLS? |
Sometimes, rather than do cool math, the easiest approach is brute force!
#include <stdio.h>
#include <assert.h>
int main()
{
enum { X0 = 3158, X1 = 1888, X2 = 1285, X3 = 1744, X4 = 253, X5 = 722,
M_START = 3159 };
for (int m = M_START; m < 10*M_START; ++m) ... |
I studied about SSL/TLS and learned that client and server must share keys below.
- common key for encryption
- common key for generating message authentication code
Then, in SSL/TLS, a client doesn't send these keys to server directly, but it sends pre master secret and generates keys from it.
This is why? |
[Stream ciphers are vulnerable to replay attack if the same key *k* is used][1].
If *E()* is a stream cipher and an attacker intercepts the message *m* that's being transmitted at time *t*, **how can the attacker compose an encryption of the following for any value of *t*?**
E(k,t || m)
----------
conte... |
Every article about port knocking, for instance https://wiki.archlinux.org/index.php/Port_Knocking , declares this method as security by obscurity. Is the following enough to remove that title;
- a scheme where a 2048 bit shared key is generated. Every 2 bytes of the key are chunked off to make a list of 1024 port n... |
Every article about port knocking, for instance https://wiki.archlinux.org/index.php/Port_Knocking , declares this method as security by obscurity. Is the following enough to remove that title;
- a scheme where a 2048 bit shared key is generated. Every 2 bytes of the key are chunked off to make a list of 128 port nu... |
For SSH why is diffie-hellmangroup1-sha1 used instead of just diffie-hellman? In other words, why is the hash function used? |
Why is diffie-hellmangroup1-sha1 used instead of diffie-hellman? |
Suppose we have identification scheme as such:
Bob takes random $r$, and encrypts it with Alices public RSA key $(n,e)$, sends $r^e$ to Alice.
Alice decrypts $r$ and sends it back to Bob, becomes identified.
Why it might be a bad idea to use same RSA key for following communication afterwards?
|
I've just dived in cryptography and would like to learn basics of this science.
Currently I can't understand the difference between these two types of attacks. As I understood from Bruce Schneier's book "Applied Cryptography", adaptive-chosen-plaintext attack is similar to chosen chosen-plaintext attack, but cryptoa... |
What is the difference between chosen-plaintext attack and adaptive-chosen-plaintext attack? |
While solving a CTF challenge online, I came across a situation where I needed to decrypt a `'.enc'` file that has been encrypted using someone's public key. The corresponding public key `'.pem'` file was provided to me. I solved almost all other CTF challenges except this one and it has been bugging me since. I solved... |
How to decrypt a '.enc' file that has been encrypted with RSA using a public key? |
While solving a CTF challenge online, I came across a situation where I needed to decrypt a `'.enc'` file that has been encrypted using someone's public key. The corresponding public key `'.pem'` file was provided to me. I solved almost all other CTF challenges except this one and it has been bugging me since. I solved... |
openssl rsa -pubin -inform PEM -text -noout < public_key.pem
Public-Key: (64 bit)
Modulus: 16513720463601767803 (0xe52c8544a915157b)
Exponent: 65537 (0x10001)
The modulus is small enough that you can [easily factor it][1]
After finding the prime factors, you can [calculate the private exponent]... |
anonymous signature implementation and usage? |
Given a set of pseudorandom functions $F=\{f_s^i\}_i$ for each $s\leftarrow\{0,1\}^n$ generated at random; moreover each $f_s^i$ uses a specific PRG $G^i:\{0,1\}^n\to\{0,1\}^{2n}$, where:
- $G^i(s)=x_1\dots x_nx_{n+1}\dots x_{2n}$ and $G_0^i(s)=x_1\dots x_n$ and $G_1^i(s)=x_{n+1}\dots x_{2n}$
- $f_s^i(1)=G_1^i(s)... |
Given a set of pseudorandom functions $F=\{f_s^i\}_i$ for each $s\leftarrow\{0,1\}^n$ generated at random; moreover each $f_s^i$ uses a specific PRG $G^i:\{0,1\}^n\to\{0,1\}^{2n}$, where:
- $G^i(s)=x_1\dots x_nx_{n+1}\dots x_{2n}$ and $G_0^i(s)=x_1\dots x_n$ and $G_1^i(s)=x_{n+1}\dots x_{2n}$
- $f_s^i(1)=G_1^i(s)... |
I have found in a Wireless Sensor Networks security paper, operations where cryptographic hash functions are elevated to the power of 2 and to the power of 3 (i.e. h^2(x) and h^3(x)).
This might be a very simple question but I havent found this notation in other literature and I wonder, are these simple computing the ... |
As part of an experiment, I was given a .enc RSA (encrypted) file that was most likely generated using openssl. I had the public key, I factored it, obtained the private exponent, and decrypted the .enc file in chunks of 64 bit. What I got as a result, was nonsense hex. I was supposed to get a password or secret key.
... |
I have found in a Wireless Sensor Networks security paper, operations where cryptographic hash functions are elevated to the power of 2 and to the power of 3 (i.e. h^2(x) and h^3(x)).
This might be a very simple question but I haven't found this notation in other literature. I wonder: does this notation mean that yo... |
I've been looking at an online [Public Key Encryption Example][1] (summarized below). It seems to me that choosing cyphertext = `plaintext^(key) mod n` would produce the same ciphertext letter for a particular plaintext letter, leading to easy frequency analysis of the output. Would there be a way to modify the example... |
Toy public/private key example open to frequency analysis? |
You are correct that in this case simple frequency analysis would be possible since the encryption is deterministic.
One can get around this when using RSA with random padding.
Here are a few references:
- [Why is padding used for RSA encryption given that it is not a block cipher?][1]
- [OAEP](http://en.w... |
I have found in a Wireless Sensor Networks security paper, operations where cryptographic hash functions are elevated to the power of 2 and to the power of 3 (i.e. $h^2(x)$ and $h^3(x)$).
This might be a very simple question but I haven't found this notation in other literature. I wonder: does this notation mean tha... |
As this question is still on the list of "questions without answers", I'll quickly answer it (Basically repeating all of the above comments).
1. Increase iteration count to something larger (1 Million?)
2. You [don't want to][1] attach your HMAC of the plain-text after the contents. Rather authenticate either the... |
I know that the affine transformation of the AES can be represented both in form of a polynomial evaluation over GF(2^8) and as a matrix-vector multiplication (see, e.g., https://autonome-antifa.org/IMG/pdf/Rijndael.pdf p.212 C.4 for the polynomial representation and p.36 3.9 for the matrix-vector multiplication). I wo... |
As part of an experiment, I was given a .enc RSA (encrypted) file that was most likely generated using openssl. I had the public key, I factored it, obtained the private exponent, and decrypted the .enc file in chunks of 64 bit. What I got as a result, was nonsense hex. I was supposed to get a password or secret key.
... |
You are correct that in this case simple frequency analysis would be possible since textbook RSA encryption is deterministic.
One can get around this by using RSA with random padding.
Here are a few references:
- [Why is padding used for RSA encryption given that it is not a block cipher?][1]
- [OAEP](http... |
So what you need is a fast cryptgraphically secure hash function?
There are some.
If you're in hardware Keccak might be an option as it uses many bit-permutations.
If you're in software there are Skein and Blake2b/s/bp/sp. Skein was the fastest hash-function of the SHA-3 competition and Blake2 is the successor to ... |
I know that the affine transformation of the AES can be represented both as a polynomial evaluation over $\operatorname{GF}(2^8)$ and as a matrix-vector multiplication (see, e.g., p.212 C.4 of [The Design of Rijndael](https://autonome-antifa.org/IMG/pdf/Rijndael.pdf) for the polynomial representation and p.36 3.9 for t... |
Using RSA for signing & verification, is there a way to take a valid signature for an unknown message, and for someone *else* to generate a valid signature using a different key against the valid signature, given knowledge of the original public key?
First, let me describe how I understand signing/verification with ... |
What use is the signature without the message under RSA? |
I was wondering why in the AES sub-bytes operation one can represent the inversion as computing $x^{254}$. What is the reason for this?
Moreoever, I was wondering what the text on page 212 of https://autonome-antifa.org/IMG/pdf/Rijndael.pdf means that the polynomial representation of the sub-bytes operation can be o... |
I want to ask that does the common reference string in NIZK have to be
random?
Or can it be anything? |
I understand the [basic operational theory][1] behind MAC, but I'm getting tripped up on some of the finer details. Also the differences between MAC, HMAC and MIC are getting lost on me, including the different utilizations between them, the benefits of using one over the other in a given situation, etc. As such, I'm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.