instruction stringlengths 32 27.2k |
|---|
In DH76 'New Directions in Cryptography', it states that
3) for almost every $K \in \{K\}$, each easily computed algorithm equivalent to $D_K$ is computationally infeasible to derive from $E_K$
($E_K$ and $D_K$ means an encryption and decryption algorithm with key $K$, respectively.)
Then, why 'almost every', and no... |
I am studying the SCA Evaluation method success rate, and I have a doubt regarding to it.
From my understanding, to calculate success rate, first we have a pool of traces all using same key and random inputs (let's say 10000 traces). The success rate for a certain trace number M(e.g. 1000), randomly choose M(1000) trac... |
If I embed some information in an image using steganography and then I print that image, will I be able to retrieve information from the printed image or not?
|
Good day everyone! Please bear with me as this is my first post on the crypto exchange. An interesting question was raised in a meeting recently about the double-encryption problem (i.e. same algorithm used on same message block twice yields weaker results). However, the team was concerned that database encryption (s... |
Being newbie to crypto, I understood that RSA keys are shared are pairs $(e,n)$ or $(d,n)$. But when I was given a doc with keys, they were in PKCS#8 format.
How to get the keys out of this format?
|
I was just looking at a post on Code Review when I noticed the other answer to the post. While I would agree mostly with the answer, I do however doubt if having a Cryptographically Secure PRNG is really an issue for generating IV's and salt values (where the salt is used for password based key derivation).
What would ... |
Recently I read about homomorphic cryptosystem. They might solve a problem. To do this there need to be some modifications from standard version.
Using Paillier here but a solution for other also fine.
E.g. given two cipher text $c_1,c_2$ with generator $g$ and factors $r_i$:
$c_i = g^{m_i} r_i^n \mod n^2$
$n=p\cdot ... |
The C++ rand() function is an Linear Congruential Generator (LCG) PRNG. my questions are:
Why was this algorithm chosen?
What are the pros and cons?
Is it good for cryptography?
|
Say, I want to generate a lot of $4\times4$ Sboxes with linear (or differential) branch numbre of $3$. One idea is to take all the $302$ affine classes, expand each of those classes and check if any of the Sboxes has the desired branch number.
Is there any better way/known result (such as, this particular class does n... |
RSA-PSS private keys
The following command will generate an RSA-PSS private key:
openssl genpkey -algorithm rsa-pss -pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537 -out CA.priKey
Here's a sample one I just generated:
https://pastebin.com/AQk0gkkT
Here's the asn1parse output:
0:d=0 hl=4 l=1213 cons:... |
The problem:
An artist posts an image of their work online with a creative commons attribution licence (on site A), someone reposts the image with attribution on another site (site B), the internet happens and the image has been cropped resized and the attribution notice is lost.
The (tentative) solution:
The artists n... |
I am new to cryptography and I am wondering Why is Proof of non-inclusion in a Merkle Tree harder than Proof of inclusion?
My naive thought for Proof of non-inclusion is that I would look for inclusion and if doesn't exist it is not included isn't it? I know this is wrong because I see papers on sparse Merkle trees etc... |
Let's say we "seed" a xof function (eg. SHAKE256) with x cryptographically random bytes (enough so that they can't be bruteforced), could said function be used as a cryptographically secure random generator? If so, when should the function be reseeded and start the process over?
|
PFS suites suffer from the same defects as any other salt-less password hashing scheme.
Why is everyone promoting Perfect Forward Secrecy (PFS) ciphersuites so fiercely?
Namely, when the group/hash weakens, then the attacker can invests into a massive pre-computation, after which individual connections/hashes can be br... |
As many know, original NTRUSign is considered broken as signatures leak information about the private key.
It takes a number of signatures to accomplish a break though, with the original break paper claiming a few hundred.
Could this signature scheme still be used as a one-time or few-time signature scheme? What would ... |
Given the standard Merkle Tree as shown Wikipedia. I am having a hard time understanding why Hash(Hash(Leaf A)|| Hash(Leaf B)) at the parent of A and B is advantageous over just Hash(Leaf A) || Hash(Leaf B). I understand that a hash can't be any more collision resistant than it's input, so why can't we just return the ... |
I'm looking at two major RSA encryption standards:
PKCS#1 ver. 1.5
RSA OAEP
The second one can use different hashing functions to create a hash of encoding parameters and then verify the hash at decoding step. PKCS 1.5 doesn't have this additional integrity check, and that's why security wise it's inferior to RSA OAE... |
It is well known that weak OWF implies strong OWF
by concatenating several evaluations of weak OWF (see e.g. here),
where weak OWF is defined as
$ \exists $ poly $Q$, $\forall$ PPT $\mathcal A$ such that:
$$Pr[x←\{0,1\}^n; \mathcal A(1^n,f(x))=x′ s.t. f(x′)=f(x)]≤1−1/Q(n).$$
I want to establish a similar argument for... |
The phrase is well-known and widely used, it is often attributed to Bruce Schneier and is indeed relevant to his Schneier's Law. However, I wasn't able to find this specific wording among Schneier's publications.
Is there any single author of the phrase, or was it just collectively generated as a convenient "meme" vers... |
Through great pain and suffering, I've been able to successfully implement Serpent. For example, when using the key 00112233445566778899aabbccddeeff, and encrypting the plaintext 0123456789abcdeffedcba9876543210, the result is 929dd890dcc881c9a7d8b94b0aa0bad5.
However, when I compare my internal rounds to those of the ... |
I've studied the concepts of Diffusion and Confusion of cryptographic algorithms, however, I don't understand why they help in preventing a statistical analysis. Are you able to explain to me?
|
I am curious why people use elliptic curve in cryptography. I know the main requirement is DLP, but elliptic curve is not the only curve with such property. Some of curves seem to be even simpler.
As an example, we can consider a circle given by the equation:
$$ x^2 + y^2 = 1 (mod p) $$
where $ x, y $ in $ Z_{p} $, $ p... |
What homomorphic cryptographic scheme should I use to perform modular reduction?
I want an encryption scheme along with an operation $\otimes$ such that
$$c = Enc(m) \otimes Enc(d) \Rightarrow Dec(c) = m \bmod d.$$
|
I read the book "Introduction modern cryptography". It gives the notion of computational security of private-key encryption at first which comes from perfect security and statistical security.
Let $(E,D)$ be an encryption scheme that uses $n$-bits keys to encrypt $l(n)$-length messages. $(E,D)$ is computationally secu... |
The Problem is as follows:
sage: p=235322474717419
sage: a=0
sage: b=8856682
sage: E = EllipticCurve(GF(p), [a, b])
sage: P = E(200673830421813, 57025307876612)
sage: Q = E(40345734829479, 211738132651297)
sage: P.order() == p
True
As we can see, P.order() is equal to p, so obviously we can use Smart's attack to calcu... |
I understand that given solutions for solving a discrete logarithm problem are on the order of (2/2), ergo, 256bit private keys based on 25519 or secp256k1 have an effective bit strength of 128bits.
I was wondering if anyone could explain how one can know the largest size private key supported by a curve. Is it to do w... |
Let $f\colon \{0,1\}^n \to \{0,1\}^n$ be a length-preserving (i.e., $|f(x)| = |x|$) one-way function. Then, for $k \in \mathbb{N}$ and $m = n^k$, the function $g\colon \{ 0,1\}^m \to \{0,1\}^n$ with
$$g(x_1, \ldots, x_m) = f(x_1)$$
is also one-way. Otherwise, being given $f(x)$ and $1^n$ as well as the description of a... |
I was looking at using PASETO's v2 "local" encryption (XChaCha20-Poly1305) to implement short-lived tokens to share claims between microservices via an untrusted client. PASETO's documentation is strong on its implementation detail, but I'm left with questions at a higher level.
Specifically, I want to avoid a scenario... |
For discrete logarithm we can pick a random number $n$ and project it to a subgroup. E.g. given a prime $p$ with
$p-1 = 2\cdot a \cdot b +1$
we can compute
$n^{((p-1)/a)} \equiv n_a \mod p$
after this $n_a$ is an element of a subgroup with size $a$
$(n_a)^a \equiv 1 \mod p$
Is there a way to do something like this for... |
Does a Logjam attack calculate a group of probable Diffie-Hellman private keys for a user and then try them one at a time to see if it can decrypt the message - or does it directly calculate the one specific instance of a user's private key?
|
Just recently, a new attack was published against SIMON-32/64 which claims to also be applicable to other versions of the cipher. The paper, now archived, is titled A Note on SIMON-32/64 Security and describes a new practical, low-cost key recovery attack which is significantly faster than exhaustive search. Unfortunat... |
$p$ and $q$ are large primes.
What is the lowest upper bound for the number of iterations for Pollard's $p-1$ algorithm for factoring $N = pq$, provided that $p = r^k + 1$, for a prime $r$, and $r^k + 1 < q < r^{k+1}$?
|
If I take the sha-256 of an empty string, and apply the hash function $2^{256}!$ times, will I end up with the same hash that I started with?
Is the smallest required cycle equal to the LCM of $1$ to $2^{256}$?
|
I`m on searching of any method of building system equations for S-boxes.
Firstly, I just cannot undestand exact meaning of "system equations", is it anf for each input (I know how to make it using Sage, maybe someone can help you make it using Magma)?
If not, please, maybe you have any articles or can a little bit desc... |
this is my first time posting here, so please be gentle! As may be obvious, I'm an amateur who knows very little cryptanalysis.
The goal
I've been playing around trying to make a simple but strong-enough cipher for a fictional world without electricity - like Middle Earth, say. Actually, even better: imagine it is post... |
Suppose my 192 bit triple DES key (in hex) is
0123456789ABCDEFFEDCBA987654321089ABCDEF01234567
What are the keys for the separate single DES operations? In this case the 168 bits triple DES key includes the parity bits to make the key size ($64 \times 3 = 192$ bits).
|
I recently learned to study the security of zero knowledge proof. As you can see on the wiki (link), it seems to be the most popular example of the Ali Baba cave. I have a question about the security of ZKP (Zero knowledge proof) in the Ali Baba cave. The reasons are as follows: During the verification process, the pro... |
The original serpent paper claims that the s-boxes provided are of non-linear order 3, the maximum. However, this has turned out to be false, as some of them are of order 2.
Are there any s-boxes available for serpent that comply with the properties indicated in the paper, and ideally, optimized for x86_64 architectur... |
What kind of quantum computer would be required, if it is possible to break such ciphers?
|
I am writing a toy1 transport protocol and I am trying to implement a feature whereby:
A 16-bit checksum is included in every packet.
This checksum can be extended to be 48-bit if the data is large, integrity is important, or whatever (creating this mostly for fun).
This checksum is intended to protect against errors,... |
I want to get the original encryption key (32 byte) of AES 256 (CBC) implementation.
The implementation has the values of the inversed round keys values hard coded into the decryption function.
I have the 15 rounds*32 byte decryption keys
Is there an algorithm that I can use to get the original generating key?
I know... |
This was published in 1986 and I'm trying to reproduce it in an assignment. It's a small variation on fiat-shamir, by the original author, which does away with a public key (and supposedly drastically improves performance) by doing:
Our improvement comes about from choosing the ${v_{i}}'s$ to be the first $k$ prime nu... |
I am very new to cryptography, I apologize if my question is so basic.
I do not understand how a hash can have a fixed length, because you can have infinite inputs to a hash function. With a fixed length you would have limited possibilities of hash outputs. So a hash can have different messages with the exact same out... |
We know that for each point $P$ on curve $E$ there exists a minimum scalar $k$ such that $kP$ equals the point at infinity. And the book Cryptography Theory and Practice by Douglas R. Stinson only mentions that adding $P_1=(x,y)$ and $P_2=(x,-y)$ equals point at infinity $O$. But in terms of coordinates, how does the p... |
Can someone explain why probabilistic padding like OAEP is particularly useful for avoiding Håstad’s Broadcast Attack? I don't really get the reason why.
|
I am practically implementing a differential cryptanalysis on a cipher which can be found in the book "The Block Cipher Companion". Following image shows the cipher:
In Fig. 6.10 (page 126) there are some evaluations to the probabilities of success to correctly restore the bits 4-8 of k5 depending on a given count of ... |
In most of the RLWE based cryptosystems, the parameter $n$, which defines the cyclotomic polynomial $\Phi_{n}(X)$, is chosen to be a power of $2$.
Apart from other benefits such as ease of writing proofs and simplicity, are there any significant computational benefits?
|
Gaëtan Leurent and Thomas Peyrin's preprint From Collisions to Chosen-Prefix Collisions - Application to Full SHA-1 (in volume 1 of proceedings of the forthcoming Eurocrypt 2019) shows a feasible chosen-prefixes collision attack on SHA-1. Given distinct prefixes $P_A$ and $P_B$ of equal length, the attack produces suff... |
For the PDP scheme, I need to generate the following parameter:
g is a generator of Q (Q is the set of quadratic residues modulo N (N = pq is the RSA modulus)
What algorithm can be used to generate this parameter most effectively?
|
I learned the stream cipher using LFSR in the book. I wonder whether all random bit generators (i.e. BBS, Rabin generator) are suitable for stream cipher. I search using keywords "stream cipher" and "BBS", and there are few results.
|
My understanding is that using a PKI, public/private key pair is generally secure to send message to people. That is, encrypt a message using the recipient's public key so they use their private key to decrypt the message. My question is if encrypting the same "String" and sending them to multiple people starts to inc... |
In Efficient and Secure Pseudo-Random Number Generation by Vazirani & Vazirani, it is stated that every pseudorandom number generator which satisfies the XOR Condition can securely output $\log n$ bits (where $\ n = |N|$). Such a condition is satisfied by the Blum-Blum-Shub (whose trapdoor is based on the quadratic res... |
I was intrigued by this question: Does adding complexity mean a more secure cipher?
And it led me to wonder: What are the implications (if any) of XORing a ciphertext with the original plaintext message? So:
$$C=(E_k(m)\oplus m)$$
My first impression was: "That sounds like a bad idea.", but is it necessarily? Seems lik... |
Many site use time-based one time password (totp) as second factor auth method, such as aws.
So we can split the totp secret and distribute each part to different party to achieve threshold login ( need at least k parties to login ).
We can split secret using shamir secret share scheme, but the problem is when we need ... |
Armv8.4-A will add extended support for more cryptographic primitives, to include SM3, which is a cryptographic hash function used in the Chinese National Standard; and SM4, a 128-bit block cipher; along with SHA2-512 and SHA3. 1
I am just curious as to why Armv8.4-A added support for SM3 and SM4? It's odd, especially... |
Regular 3-steps Schnorr protocol is a proof of knowledge system for discrete logarithm.
It's honest-verifier zero-knowledge,
but not full zero-knowledge.
My question is, is it witness-hiding?
(I guess it should be the most important property in many cases,
rather than too strong and not required ZK, and too weak HVZK).... |
We need to verify two claims about a set of numbers:
They are random
They are unique in the set (the set is about 200 billion (2TB bin storage))
Supposedly, the numbers were generated by a TRNG (based on a radiation detector). The TRNG itself is a PCI Express card (which we do not have yet) and is probably a TRNG fee... |
Is there any way to check that a nonlinear boolean function is balanced or not?
I can't think any other way except to check all input variables.
|
I am trying to create a padding oracle attack to decrypt a cipher that is encrypted with cbc and PKCS#7 padding.
My first step is just to try and decrypt the second block.
I have read a lot about it, and have started to code the first step of the attack, where I edit last byte in the first block and send it to the orac... |
I have seen in several places the statement "k-SIFF can be constructed from any one-way function", but I cannot understand how this is realized in practice?
For instance, in
Sibling Intractable Function Families
and Their Applications, Theorem 2.
|
I'm currently reading about important lattices problems and noticed that while CVP, SVP, and LWE have decisional versions, SIS does not. I read in the question Relation between decisional SIS and leftover hash lemma in lattices that deciding between the distributions (A, u) when $A \in Z_{q}^{n \times m}$ and $u = Ax$... |
I currently have this TOFU protocol:
First connection:
Client generates salt and inputs a password
Client saves salt
Client hashes password with argon2 and salt
Client generates Ed25519 keys
Client sends to the server: Ed25519 public key, argon2 hashed password
Server saves received Ed25519 public key and argon2 hashe... |
Would it be better to use SHAKE-128/256 or SHA3-256/512? In what situation should I chose one over the other?
|
Each of the NIST tests are generally explained in Random Bit Generation - Guide to the Statistical Tests. I was wondering if some one can help me understand them better. For example, which tests show the robustness, independence, ergodicity, stationarity, etc.
Based on the description provided on NIST website, I think,... |
Right now we don't have a single generalized question asking how the CBC padding oracle attack works. We have e.g. this one and this one but the former is distracted by the concrete values being thrown around and the specific problem the poster has and the latter is distracted by the complications introduced by ASP.NET... |
My question is: Are ephemeral keys symmetric or asymmetric?
If symmetric, can ephemeral keys be created based on a (UserID || nonce)?
|
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 after some consideration I believe I'm starting to understand it.
One thing that I stumbled on was key size estimation, step 3. I finally found a write-up:
fn score_keysize(keysi... |
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 across are very complicated (except for MD5 but that's overly insecure).
Are there any slightly simpler hashing alogorit... |
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?
|
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 things by that).
But my main issue is with this:
Tokenization also helps protect your online shopping activities. You buy a ... |
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?
(q = 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab)
If I do this, can I convert the affine point coordina... |
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 factorisation?
If not, why not?
|
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 for all keys? Or is it better to encrypt every key with a different password?
|
I was reading the HORS One-Time-Signature scheme by Reyzin & Rezyin, but I could not understand how they derived their security equation $(rk⁄t)^k$. I understand that the total number of balls is $t$, and each time a signer signs his message, he reveals $k$ different balls. The attacker at this point and after one sign... |
If we use non-deterministic MACs in encrypt-and-authenticate approach, is it secure?
|
What is the reason behind picking either $3$ or $2^{16}+1$ for generating the public key in RSA?
|
I was working on a tool that signs small messages (~20 bytes) when a question occurred about message size: What would be the risk of using extremely small/restricted input (say, 5 bytes of hexadecimal chars) messages? Since the data is a hash and replay attack is not a concern, the message wasn't originally salted.
Wo... |
Is there any secure cryptographic hash function based on the logistic map?
|
Starting with the same primes $p$ and $q$ to generate $n=pq$, will Carmichael's totient function and Euler's totient function give the same public key ($e,n$) and private key ($d,n$) in RSA encryption?
If not, are there specific types or range of primes $p$ and $q$ that result in the difference?
THANK YOU!
|
I believe there are different time complexities for Euler's totient function depending on how you execute the algorithm. The two I know of are:
Iterate through 1 to k and calculate each $\gcd$: $O(n \log(n))$
Factor n first and then use Euler’s product formula: $O(n)$
Are there any other possibilities?
|
I am working on an application where we will be encrypting billions of small (< 2,000 bytes) records. Combined, we are facing many TB of data. Each record will be encrypted independently, using a unique IV/nonce.
We are aware of the restrictions around the reuse of IV/nonce values and the limits on the amount of data... |
I want to make an end-to-end messaging platform where everyone is identified with a unique random private key. Everyone uses other peers' public keys to identify and send encrypted messages and verify received messages signed by the public keys. Now I want to use multiple public keys for each peer and maybe give peers ... |
Let $\mathcal{G}$ be a cyclic additive group for an elliptic curve $E\, / \ \,\mathbb{F}_p$, and let $p, n$ be two large prime numbers (e.g., we can consider $\texttt{secp160r1}$ with $p = 160$ bit and the reasonably even $n$ is $160 $ bit long).
I have read several papers in which hashing functions were defined, but... |
I need to choose an encryption system, so I am trying to understand the differences between the existing options. I always find that people compare ECIES (Elliptic Curve Integrated Encryption Scheme) with RSA or ElGamal. It is clear that elliptic-curve-based encryption schemes are much more robust than RSA and ElGamal.... |
I have just started looking into the cracking of the Vernam cipher with two ciphertexts encrypted with the same key by XORing them and then crib dragging and I was wondering if it is made easier if you have more ciphertexts like 3 or 4, and if so how that would be used to the crackers advantage?
|
I'm having some hard time understanding why the size of the share must be at least as large as the secret itself, why is this restriction imposed? What would happen if the share is smaller?
|
I'm studying how the selection of prime numbers in RSA encryption may affect the security of the encryption in regards to the public key.
Essentially, are there any specific types of prime numbers that render the most secure public key? (meaning that someone cannot backtrack the public key and figure out the private ke... |
Is it true that $\varphi(n)$ is generally larger than $\lambda(n)$ for the same $n$? If so, can anyone give me a proof?
|
This question is a little bit more implementation based of differential cryptanalysis. I hope it is okay.
I am working with the book "The Block Cipher Companion" on the topic differential cryptanalysis currently. I want to implement the proceed, but it seems that there are some problems over here. May be someone had a... |
If we have the following block cipher, E(k,m), why is f(x,y) not collision resistant?
$$f(x,y) = E(y,x) \oplus y$$
|
I've seen the word 'cost' being used several times in describing algorithms e.g. algorithm A costs more to compute than algorithm B. What does 'cost' mean in this sense?
|
I know that lcm(n) or Carmichael's totient function $\lambda(n)$ is now used instead of $\varphi(n)$ or Euler's totient function to generate the public key in RSA encryption? Why is this so? Are there any mathematical, computer scientific reasons behind this related to key security or efficiency?
|
In RSA clock arithmetics is used, and as Fermat's little theorem says, $a^p \bmod p = a$. The exponentiation is cyclical, $a^x = a^{x \bmod p-1} \bmod p$, the same sequence of numbers is repeated in each cycle. Is there in a similar way a cycle for all modular exponentiation, or, only for some cases like prime modulo?
|
Universal composability (UC) framework seems to be a powerful framework for proving security of protocols, which guarantees security even in the presence of concurrent composition. Though, I see there are multiple variants of the original UC framework, such as simplified UC (SUC), joint state UC (JUC), global setup UC ... |
I am currently trying to implement a proof of knowledge of the preimage to a public hash image using different zkp system implementations.
There are a lot of examples that do exactly this (see this question for some further reference). But: All of these have a fixed input size to the hash function (often two times 256-... |
GnuPG on-disk storage of secret key material is encrypted with AES-128, with an encryption key generated via an iterated and salted SHA-1 hash of the given passphrase.
Is this usage of the SHA-1 hash function secure, and, if so, will it remain secure, even in the distant future?
|
For a university project, I am currently implementing the RingCT Ring signatures as used in Monero (before the introduction of Bulletproofs) as laid out in this paper.
To close the ring we calculate the last $s$ like this: (where $\alpha$ is the random value initially chosen and $l$ is the order of the elliptic curve ... |
This is a reprise of an earlier question of mine, and I'm sorry if it's repetitious; I'm going at it with a different strategy.
In an exercise I was given a 1-round Feistel network which uses $H(k \oplus x)$ as a round function. The key is 128 bits and the block length 256 bits, but we're asked to find the key in rough... |
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}$. But I don't know if there is a smaller $p$ that would have the same "order" for the roots of unity, or how to find smallest... |
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 SecureRandom is used or does it make no difference? if yes why? if not, why not?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.