instruction stringlengths 15 30k |
|---|
Are there any instances where a combination of industry standard encryption algorithms can weaken the overall encryption of the data?
As a Naive example using non-standard encryption algorithms, running ROT13 on textual data a second time would actually unencrypt the text. |
Can a combination of encryption algorithms weaken the overall encryption? |
How to prove the hardness of Rabin's function ? |
How to prove the hardness of Rabin's function? |
I've run into this issue a couple of times in my career. I'll see if I can explain with an example (please ignore the fact that this is implausible in the real-world).
Suppose I sell computers, and I have account data on the person that purchased every computer I sell. I also install tracking software on every compu... |
Does any of you know what is the difference between the Pedersen commitment and the commitment that uses the ElGamal encryption scheme?
For the sake of completeness, I recall what both of them look like.
Given two public and large primes $p$ and $q$ such that $q∣(p−1)$, and a (also public) generator $g$ of the o... |
I need to write a first program in one language that saves data in a text file, and write a second program in a second language to decrypt that file. The two languages in question don't include any crypto libraries, so I'm on my own.
Could someone recommend, point me to, or summarize a simple algorithm (pseudo code)... |
Often people build hardware that contains cryptographic algorithms, and they are worried about what happens if that hardware falls into the hands of an attacker.
Historically, there have been several approaches to making it harder for the attacker, often used in some combination:
* Hardware and cryptographic al... |
I just recently concerned myself with cryptography due to Snowden's revelations and there are a few things I cannot really wrap my head around but maybe you can help me with that. I am not a mathematican or a programmer and most of the stuff I know about cryptography comes straigt from The Imitation Game, so pleas excu... |
I need to write a first program in one language that saves data in a text file, and write a second program in a second language to decrypt that file. The two languages in question don't include any crypto libraries, so I'm on my own.
Could someone recommend, point me to, or summarize a simple algorithm (pseudo code)... |
I am using SpongyCastle for a project in android. I have used RSA to encrypt the data and then decrypt it in another activity, the keys are stored in the sharedPreferences.
I discovered a thing I cannot explain.
Since my keys are generated only once and stored for the future use without being changed. On encrypti... |
I have a key pair, say $(d, Q)$. I send my public key $Q$ to 2 different people. I also get their public keys $Q_1$ and $Q_2$. Now I can derive 2 shared secrets, $d*Q_1$ and $d*Q_2$. The 2 other people can also derive secrets $d_1*Q$ and $d_2*Q$. Assuming all key pairs were generated from the same elliptic curve, is i... |
Though I can get the basic idea of UC Framework, namely let the environment cannot distinguish the real protocol with the real adversary and the functionality with the simulator, I am still puzzled in details:
1. What's the principle to design the functionality, if it aims to a new scene that Canetti hasn't treated... |
Though I can get the basic idea of UC Framework, namely let the environment cannot distinguish the real protocol with the real adversary and the functionality with the simulator, I am still puzzled in details:
1. What's the principle to design the functionality, if it aims to a new scene that Canetti hasn't treated... |
Though I can get the basic idea of UC Framework, namely let the environment cannot distinguish the real protocol with the real adversary and the functionality with the simulator, I am still puzzled in details:
1. What's the principle to design the functionality, if it aims to a new scene that Canetti hasn't treated... |
I need to find RSA private key (d, N) knowing (e, N). It's "own" RSA implementation. As i know
p is random 70 bit number, then q is p-2^10 < q < p+2^10
d is max 16 bit long with low number of ones in binary representation.
e= 4223234360740816682261885795416553301541344119
N = 507477229128645920677404020805907... |
I need to find RSA private key $(d, N)$ knowing $(e, N)$. It's "own" RSA implementation. As i know<br>
$p$ is random 70 bit number, then $q$ is $p-2^{10} < q < p+2^{10}$<br>
$d$ is max 16 bit long with low number of ones in binary representation.
$e= 4223234360740816682261885795416553301541344119$
$N = 5074772... |
> 1. What's the principle to design the functionality, if it aims to a new scene that Canetti hasn't treated? Are the ability to corrupt parties (by some unknown methods) required to be written into the functionality? What else (except the normal functions) should be written into it?
Basically, you can design the id... |
> 1. What's the principle to design the functionality, if it aims to a new scene that Canetti hasn't treated? Are the ability to corrupt parties (by some unknown methods) required to be written into the functionality? What else (except the normal functions) should be written into it?
Basically, you can design the id... |
> Am I correct in assuming the above?
No you are not. You are showing textbook/raw RSA, which is little more than modular exponentiation. To be secure RSA has to use padding methods. Without padding, RSA would indeed generate the same ciphertext each time. This alone would break the security requirements of a cipher... |
> On encrypting the same plain text, I get two different outputs.
This is in fact a design goal of encryption systems: an adversary who sees two ciphertexts should not be able to tell whether they're equal — that would be an information leak. Even encryption systems that would otherwise be secure use an [initializat... |
I am using SpongyCastle for a project in android. I have used RSA to encrypt the data and then decrypt it in another activity, the keys are stored in the shared preferences.
I discovered a thing I cannot explain.
My keys are generated only once and stored for the future use without being changed. On encrypting the ... |
Why are RSA ciphertexts different for the same plaintext? |
> Am I correct in assuming the above?
No you are not. You are showing textbook/raw RSA, which is little more than modular exponentiation. To be secure RSA has to use padding methods. Without padding, RSA would indeed generate the same ciphertext each time. This alone would break the security requirements of a cipher... |
I am using SpongyCastle for a project in android. I have used RSA to encrypt the data and then decrypt it in another activity, the keys are stored in the shared preferences.
I discovered a thing I cannot explain.
My keys are generated only once and stored for the future use without being changed. On encrypting the ... |
> Am I correct in assuming the above?
No you are not. You are showing textbook/raw RSA, which is little more than modular exponentiation. To be secure RSA has to use padding methods. Without padding, RSA would indeed generate the same ciphertext each time. This alone would break the security requirements of a cipher... |
I recently started learning cryptography. I have learned some basic stuff. I'm also started learning about pc security, so I was wondering how do hackers use cryptography for bypassing antivirus software? I don't have some deep understanding on how Antivirus software works but I know that every Antivirus has base of ... |
Can we reduce Diffie-Hellman problem to "Discrete-log inversion" problem? |
Let $\mathsf{Exp}_{A,\Pi}(\lambda)$ be some indistinguishability experiment that finally outputs 1 if A outputs $b'$ that satisfies $b' = b$, otherwise 0. Then the textbooks often define the security like this:
> If for all PPT adversary A, there exists a negligible function $\mathsf{negl}$ satisfies $\Pr[\mathsf{E... |
"$\leq 1/2 + \mathsf{negl}(\lambda)$" or "$= 1/2 + \mathsf{negl}(\lambda)$"? |
I have a tiny device that has a challenge-response authentication mechanism where the device signs 8 bytes of any data with it's internal 2048 bit RSA key.
I would like to be able to certify any data using this mechanism by using a number of challenge-response pairs securely chained together (using only 1 pair alrea... |
Is there a scheme that allows to use RSA based challenge response protocol limited to signing only 8 bytes to create a secure signature of any data? |
Note that in the definition you gave, it says that in order for $\Pi$ to be an indistinguishable scheme, then the above inequality must hold **for all PPT adversaries**.
> So it seems that if $\Pi$ holds the indistinguishability, then there
> should not exist any adversary A that
> $\Pr[\mathsf{Exp}_{A,\Pi}(\lambd... |
Note that in the definition you gave, it says that in order for $\Pi$ to be an indistinguishable scheme, then the above inequality must hold **for all PPT adversaries**.
> So it seems that if $\Pi$ holds the indistinguishability, then there
> should not exist any adversary A that
> $\Pr[\mathsf{Exp}_{A,\Pi}(\lambd... |
Note that in the definition you gave, it says that in order for $\Pi$ to be an indistinguishable scheme, then the above inequality must hold **for all PPT adversaries**.
> So it seems that if $\Pi$ holds the indistinguishability, then there
> should not exist any adversary A that
> $\Pr[\mathsf{Exp}_{A,\Pi}(\lambd... |
i'm reading the article of Massey and Sain ([here][1]) and i cannot unserstand - what is "foreforward inversion"?
I mean
There is a description of circles in convolutional codes and a little bit description about catastrophic codes (i mean, codes that makes an infinite amount of errors on decoding if there was a ... |
I was reading [this][1] wiki section on the countermeasures against replay attacks and it basically suggests that:
If Bob wants to confirm Alice's identity he can send a one-time token (I think it should be called a 'salt') to Alice which she appends to her password and hashes it before sending it back to Bob, who ... |
On countermeasures for replay attacks. Does this one require plaint text password storage? |
Say I have a polynomial adversary $A$ that can distinguish with a non-negligible adventage between $x$ generated from a probability $X$ and $y$ generated from probability $Y$.
Obviously, this implies that it is possible to either efficiently distinguish between $X$ and the uniform distribution, or between $Y$ and th... |
Say I have a polynomial adversary $A$ that can distinguish with a non-negligible adventage between $x$ generated from a probability $X$ and $y$ generated from a probability $Y$.
Obviously, this implies that it is possible to either efficiently distinguish between $X$ and the uniform distribution, or between $Y$ and ... |
Perhaps a proof by contradiction? Either they are both indistinguishable from uniform or not. If so, they are indistinguishable from each other. Since that contradicts the premise, at least one must be distinguishable from uniform. |
Imagine I want to send imaginary defcon levels to another party over the internet. I know there are good protocols for this like SSL, but lets say I only have a blackbox tool where I can input an AES key, and a plaintext. The output of the box is the encrypted plaintext with the input key.
If I send my encrypted de... |
UMAC uses a key to choose a random hash function from a family of universal hash functions. The value of the hash function is always encrypted using yet another key, and the resulting ciphertext becomes the MAC code.
- What would go wrong if I skipped the encryption step?
- In case I **have to** skip the encryption... |
Why does UMAC encrypt the output of universal hash function? |
> What would go wrong if I skipped the encryption step?
It's be easy for someone getting some message/UHASH pairs get enough information about the key to produce further message/UHASH pairs himself. If he receives enough pairs (and it wouldn't take that much), he can fully recover the entire key (and then generate ... |
> What would go wrong if I skipped the encryption step?
It's be easy for someone getting some message/UHASH pairs get enough information about the key to produce further message/UHASH pairs himself. If he receives enough pairs (and it wouldn't take that much), he can fully recover the entire key (and then generate ... |
From NIST SP 800 - 90A from January 2012 (see http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf), page 6:
> For the purposes of this Recommendation, an n-bit string is said to have
> full entropy if that bit string is estimated to contain at least
> (1-\epsilon)n bits of entropy, where 0 <= \epsil... |
From NIST SP 800 - 90A from January 2012 (see http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf), page 6:
> For the purposes of this Recommendation, an n-bit string is said to have
> full entropy if that bit string is estimated to contain at least
> (1-\epsilon)n bits of entropy, where 0 <= \epsil... |
What you are doing is the following:
1. Choose a random number $r$ in $[1,2^n-1]$.
2. Check if $r$ is invertible $\bmod n$<br> (should be with probability $\approx1-2^{-2000}$, because by random luck you'd have to hit $p$ or $q$),<br> if not go to 1.
3. Check if $(\frac{r}{p})=(\frac{r}{q})=1$<br>($(\frac{a}{n}... |
What you are doing is the following:
1. Choose a random number $r$ in $[1,2^n-1]$.
2. Check if $r$ is invertible $\bmod n$<br> (should be with probability $\approx1-2^{-1000}$, because by random luck you'd have to hit $p$ or $q$),<br> if not go to 1.
3. Check if $(\frac{r}{p})=(\frac{r}{q})=1$<br>($(\frac{a}{n}... |
This semester I am taking the course Cryptography. I will have a presentation about the topic "Voting Scheme".
I am preparing myself by reading from the book Cryptography : an Introduction, N.Smart and I came accross some points at which I am facing some difficulties.
The part that I am reading is this:
The v... |
From NIST SP 800 - 90A from January 2012 (see http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf), page 6:
> For the purposes of this Recommendation, an n-bit string is said to have
> full entropy if that bit string is estimated to contain at least
> $(1-\epsilon) n$ bits of entropy, where $0 <= \e... |
This semester I am taking the course Cryptography. I will have a presentation about the topic "Voting Scheme".
I am preparing myself by reading from the book Cryptography : an Introduction, N.Smart and I came accross some points at which I am facing some difficulties.
The part that I am reading is this:
The v... |
I'm working with the elliptic curve $\mathcal{E} : y^2 = x^3 + 11x^2 + 17x + 25$ over $(\mathbb{Z}_{31},+,\cdot)$ and am trying to double $P=[2,7]$.
Following the instructions [here][1], I'm doing the following:
$$s = \frac{3\cdot2^2+17}{2\cdot7} \equiv 29\cdot14^{-1} \equiv 29\cdot20 \equiv 22 \pmod{31}$$
$$x... |
I'm working with the elliptic curve $\mathcal{E} : y^2 = x^3 + 11x^2 + 17x + 25$ over $(\mathbb{Z}_{31},+,\cdot)$ and am trying to double $P=[2,7]$.
Following the instructions [here][1], I'm doing the following:
$$s = \frac{3\cdot2^2+17}{2\cdot7} \equiv 29\cdot14^{-1} \equiv 29\cdot20 \equiv 22 \pmod{31}$$
$$x... |
Could somebody tell me what the meaning is of $h(r)$ in the protocol below?
$A\leftarrow{B}\quad:{h(r)}{,B}{,P{_A(r,B)}}
\\A\rightarrow{B}\quad:r$ |
What is the meaning of h(r) in this protocol? |
I recently came across a project called [rsyncrypto][1] that sacrifices some security so that you can have rsync-friendly files. My understanding is that it works by generating a symmetric key for each file you're encrypting, and saving that symmetric key to a file. It then encrypts the file using that symmetric key, e... |
Why does rsyncrypto require a public key during decryption? |
I am developing a software to encrypt/decrypt files/streams using symmetrical encryption algorithm. During encryption phase data wil be compressed and encrypted.
When decrypting data, I want to be able to check whether supplied password is correct. For that purpose encrypted file contains header (which I would like ... |
How to quickly detect incorrect password in encrypted file without compromising security? |
I get a request from a client who encrypts the message with the wrong AES key. Is there a way for me to know what AES key the client actually used? I understand I may get the decrypted msg which is likely to be wrong, but from what I understand, the key itself cannot be retrieved from the request sent by the client.
... |
It is suspicious that the client have send to the server something with a different key than the symmetric one they had agree before, isn't it?
A way how one side could known that the other has used a different key is when the decrypted message doesn't have sense (like doesn't pass a validation system you prepare).
... |
I understand that RSA is great for 1-to-1 digital signature. In the group chat of N people, other than storing and maintaining N public keys, is there a simpler way of authenticating each and everyone in the room? Perhaps with just one public key per client? |
Digital signature in a group chat scenario? |
When using symmetric encryption is it important to compress the data first?
I think that compression will make data look "more random" and this might help the ciphertext be harder to crack but I am not sure if it's a requirement or not - could it be the case for some ciphers but not for others?
|
Compression in Symmetric-Encryption? |
> When using symmetric encryption is it important to compress the data first?
No, not really (unless you're concerned with bandwidth usage). On the other hand, compressing the message can leak data (for example, how compressible the data is).
> Could it be the case for some ciphers but not for others?
No, or ... |
$Z=(N-XY)^2$ is a surface with absolute minima ($0s$) anywere $Y=N/X$.
I know this question is naiive, but shouldn't it be possible to apply a [lossy compression][1] filter to this function which preserves values only at discrete boundaries and then search for absolute minima?
If the answer is no, is there any on... |
*(Context: I'm auditing some code which I suspect to be insecure, but I'd
like to be able to quantify this.)*
Suppose you have a 56-bit secret key (```$secret```), and suppose you have revealed the following information to untrusted parties:
* ```$salt``` -- An easily discovered string
* ```$prefix``` -- Th... |
I can't seem to verify the signature scheme described below.
---
*Key Generation*
**Public Key:**
$$y_1=g^{a_1}y^{a_2} \pmod p$$
$$y_2=g^{b_1}y^{b_2} \pmod p$$
$g$ denotes a generator of $Z_p^*$ and $y$ is a random element from $Z_p^*$. The private key is $(a_1,a_2,b_1,b_2)$.
*Signing*
$$\sigma_1=a_1... |
I was reading through the Linear Feedback Shift Register. Consider a
x^5 + x^2 + 1, which is a primitive polynomial. This should have a period of 2^5 - 1 = 31. However, when I tried to generate a pseudo random sequence from this, the period turns out to be 15.
![enter image description here][1]
01 -> 11111 &nbs... |
<sup>(Context: I'm auditing some code which I suspect to be insecure, but I'd
like to be able to quantify this.)</sup>
Suppose you have a 56-bit secret key (`$secret`), and suppose you have revealed the following information to untrusted parties:
* `$salt` – An easily discovered string
* `$prefix` – The fir... |
I was reading through the Linear Feedback Shift Register. Consider a
$x^5 + x^2 + 1$, which is a primitive polynomial. This should have a period of $2^5 - 1 = 31$. However, when I tried to generate a pseudo random sequence from this, the period turns out to be $15$.
![enter image description here][1]
01 -> 111... |
If you have two prefixes, say $p_1$ and $p_2$ assuming a well designed hash function, this will give you two lists of possible candidates $L_1,L_2$ each of size roughly $2^{24}.$ The correct value is in both of these lists. It is unlikely to also have spurious candidates since assuming uniformity o relevant variables a... |
If cryptanalysts today were to crack the original Enigma machine, “how fast” or “how easily” could they do it? What methods would they use?
The original cracking was significantly helped by operator mistakes, like always including the same header, always including a weather report, and finally, a long message of `LL... |
I was reading about the Linear Feedback Shift Registers and I am confused about the technique to find the period of a primitive polynomial. Consider the polynomial $x^5 + x^2 + 1$. As this is a primitive polynomial, it should be a maximal period LFSR. Its period should be $2^5 - 1 = 31$. However, when I tried to genera... |
This semester I am taking the course Cryptography. I will have a presentation about the topic "Voting Scheme".
I am preparing myself by reading from the book “Cryptography : an Introduction” by N.Smart and I came across some points at which I am facing some difficulties.
The part that I am reading is this:
> ... |
This semester I am taking the course Cryptography. I will have a presentation about the topic "Voting Scheme".
I am preparing myself by reading from the book “Cryptography : an Introduction” by N.Smart and I came across some points at which I am facing some difficulties.
The part that I am reading is this:
> ... |
I presume you are referring to hardcore, one-way functions (OWF's) with polynomial span?
There have been a flurry of publications in the past 12 months relating to these functions and their implied possibility or practicability.
The challenge with hardcore predicates has been in achieving polynomial span...
[Be... |
This semester I am taking the course Cryptography. I will have a presentation about the topic "Voting Scheme".
I am preparing myself by reading from the book “Cryptography : an Introduction” by N.Smart and I came across some points at which I am facing some difficulties.
The part that I am reading is this:
> ... |
After contacting D-Wave and asking them the implications of their quantum computer against RSA, they responded that they had not cracked RSA for the following reasons…
**Short answers:**
> Q. Is RSA effectively cracked by your quantum computer
> A. No.
> Q. Should our customers be concerned that companies w... |
Of course - the **whole important question** is the one you "left out for another day."
If a party in the middle can spoof IP addresses for some poor browser, then the party in the middle can act like a server to the browser, and act like a browser to the server. There will be two "premaster secrets", and how will ... |
Recently, Fujisaki and Okamoto provided a revised version of the Fujisaki-Okamoto transformation [1], a generic transformation for achieving IND-CCA2 security. This new version is slightly different than the original [2] and the security proof does not define a knowledge extractor (the original version actually proved ... |
Recently, Fujisaki and Okamoto provided a revised version of the Fujisaki-Okamoto transformation [1], a generic transformation for achieving IND-CCA2 security. This new version is slightly different than the original [2] and the security proof does not define a knowledge extractor (the original version actually proved ... |
I think we're all aware of the "classical" Weierstrass (short?) elliptic curve equation: $y^2\equiv x^3 + ax +b \pmod p$. Well known examples of these curves include the NIST's and Brainpool ones.
Now there's also the "Montgomery" representation: $y^2\equiv x^3 + ax^2 + x \pmod p$ where the famous Curve25519 is an e... |
What are the differences between the elliptic curve equations? |
> The class number of the principal order belonging to the
> endomorphism ring of E SHOULD be at least 200.
[From TR-03111 (pdf page 15).][1]
This value commonly is referred to as $h$.
So my question(s):
- What does $h$ mean / denote?
- Why should it be 200 or larger?
[1]: https://www.bsi.bund.de... |
EC: Why does $h>200$ need to hold? |
I know that the algorithm used to generate the Brainpool curves and the NIST curves is published. The algorithm should be [this one][1]. From what it looks like it's rather slow to find secure parameters.
After some research I've also found [this paper][2] (in fact it's a PhD thesis I think) on the generation of sec... |
How to generate own secure elliptic curves? |
I think we're all aware of the "classical" Weierstrass (short?) elliptic curve equation: $y^2\equiv x^3 + ax +b \pmod p$. Well known examples of these curves include the NIST's and Brainpool ones.
Now there's also the "Montgomery" representation: $y^2\equiv x^3 + ax^2 + x \pmod p$ where the famous Curve25519 is an e... |
I read in a book that let f(K,R) is cryptographic transformation of R using K, K{R} means R is encrypted using K and h{R} is the hash of R and then the example follows.
I want to know what is difference between cryptographic transformation of R and encryption of R using the same key? Aren't they same thing? |
What is difference between Cryptographic Transformation, Encryption and Hash? |
I read in a book that: let $f(K,R)$ is cryptographic transformation of $R$ using $K$, $K\{R\}$ means $R$ is encrypted using $K$ and $h\{R\}$ is the hash of $R$ and then the example follows.
I want to know what is difference between cryptographic transformation of $R$ and encryption of $R$ using the same key? Aren't... |
I'm getting this strange result that **SHA512** is around 50% *faster* than **SHA256**. I'm using .net's `SHA512Managed` and `SHA256Managed` classes. The code is similar to the one posted [here][1] but I'm referring to tests taking caching into account (from the second time reading the file onwards it seems that it's c... |
SHA512 faster than SHA256? |
I don't understand how HMAC.Update function works (for example, in SSL realization defined here: https://www.openssl.org/docs/crypto/hmac.html).
If I understand this correctly, these two pieces of pseudocode should return the same HMAC (e.g. Result1 = Result2):
**Code 1:**
HMAC.Init;
HMAC.Update('key','abc');
... |
How HMAC.Update function works? |
I know how standard HMAC(key,msg) function works, and I want to write a Delphi port of HMAC class that implements Update function. The problem is that I don't understand how this Update function works (for example of Update function, see SSL definition here: https://www.openssl.org/docs/crypto/hmac.html).
If I under... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.