instruction
stringlengths
32
27.2k
As there don't seem to be any PQC alternatives for Diffie-Hellman (DH / ECDH), DH must have been replaced by key encapsulation using an ephemeral key pair. However, since TLS 1.3 always performs ephmemeral key agreement during the handshake I think that it is not possible to directly replace DHE / ECDHE with key encaps...
I don't understand what the dot notation is. Is it like a multiplication operation or an addition operation or what? and how is that related to the Elliptic Curve Discrete Logarithm Problem? For example, this site is explaining an example of dotting two points on the Elliptic Curve
Following is a sentence from the book "Cryptography and Network Security - Principle and Practices" by William Stallings [Fourth Edition] Sentence - " ... the 'one-time pad' is of limited utility, and is useful primarily for low bandwidth channels requiring very high security. " Can anyone please elaborate on low bandw...
I am trying to figure out what typical formats and sizes, etc. are, for storing ECC public and private keys. Some quick research turned up X9.62 (to which I don't have access) and SEC1. But then there is also X.690 which includes DER and of course ASN.1. And let's not forget PEM. If somebody could shed some light onto ...
I have a web app, in which I am encrypting user data client side. Each client has their own password, which is used to derive an encryption key (via Scrypt) for encrypting their data. Since the data is client side and a hacker has full access to the (encrypted) data, would it be necessary to use a salt for Scrypt? The ...
I have an application where I need to store small to moderate amounts of data in a symmetrically encrypted form. For various reasons, CMS with an AuthEnvelopedData seems to tick all the requirements. For example, password recipient info (PWRI) neatly binds up the KDF and the (encrypted) content encryption key. Another ...
The indicator function (or characteristic function) is defined as $f_{t^*}:\mathbb{Z}_q\to \mathbb{Z}_q$ satisying that $f_{t^*}(t)=1$ if $t^*=t$ and $f_{t^*}(t)=0$, otherwise. (Here $t^*\in \mathbb{Z}_q$ is given to define the function.) I am dealing with transforming the function into an arithmetic circuit with addit...
I understand what SP-network (Substitution-Permutation Network) and Feistel Network look like. And those ciphers based on Feistel (e.g. DES) often achieve so called E/D similarity, which indicates that the cipher itself follows the same pattern during either encryption or decryption. SPN, comparing with Feistel Network...
I was wondering if we could use any general symmetric key MAC, a collision resistant hash $H$ and zk-SNARK (or any general NIZK scheme) to construct a signature scheme. I have a MAC key $k$, which is also my private key, and the public key is $h = H(k)$. As a signature for the message is $(mac = MAC_k(m),\pi)$ where $...
Recently I'm researching about logical circuit calculation and I hope to use homomorphic encryption to protect the whole process. I've read Gentry's paper and use some websites like https://asecuritysite.com/encryption/hom_xor, and I wonder if there are some other methods? Few days ago, I thought that position transfor...
This question is based on a previously asked question. How to make a message into a polynomial on NTRU encryption? I am tasked to implement NTRU with toy parameters such as $N=7$ or $N=11$ and I have some questions. Does the message length have to be smaller than or equal to the parameter $N$? Can I do encryption on a...
I have a question regarding the theoretic definition of Pseudorandom Generators. In Katz & Lindell's textbook (2nd edition), Definition 3.14 (p. 62), it is defined as follows: DEFINITION 3.14. Let $\ell$ be a polynomial and let $G$ be a deterministic polynomial-time algorithms such that for any $n$ and any input $ \in...
Are Common Reference String (CRS) and Structured Reference String (SRS) is the same in preprocessing phase of zk-SNARK? Is there any difference between them?
The original secure parameters for NTRU shown below are from the original HPS98 paper. This is vastly different from the current secure suggested parameters in the NIST PQC round 3 submission. Security N q Moderate 107 64 High 168 128 Highest 503 256 What are attacks done so far that have broke the mode...
LMS is a hash-based digital signature scheme. It is a standard alongside of XMSS, which has it's bit-security stated in the paper(about 200bit-security for standard parameters). LMS security assumption is based on ROM of hash functions. Does it mean the bit-security for LMS is equal to the bit-security of hash function...
So my understanding of TLS is that it uses asymmetric cryptography such as DH to perform a key exchange, once this has occurred it then used an symmetric algorithm for the data exchange. (Obviously I am missing a lot of detail here and it may be slightly inaccurate but I think thats generally the high level idea?) My q...
As far as I understand, the elliptic curve group based on BLS12-381 is prime order and cyclic. Thus, any group element could be used to generate all the elements of the group. Why is a point explicitly hard-coded as the generator of the group here and here? If any group element serves as a generator of the group, what...
I'm new to crypto and I want to generate a key pair, in C, which would be the equivalent of openssl ecparam -name secp256k1 -genkey -out ec-priv.pem. I love libsodium API but I can't find how (if ever) to generate a key pair that is an EC key. I was expecting to get a 32-byte private key, and a 64 byte (+0x04) public k...
So I have an unknown key but with the length of 6. I understand that I calculate my own English letter frequency of my letters. I then compare it with the standard English letter frequency and identify a pattern shape similarity (in regards to a bar chart). I get my first letter for the key, however, how do I proceed w...
Claus Peter Schnorr recently posted a 12-page factoring method by SVP algorithms. Is it correct? It says that the algorithm factors integers $N \approx 2^{400}$ and $N \approx 2^{800}$ by $4.2 \cdot 10^{9}$ and $8.4 \cdot 10^{10}$ arithmetic operations. Does this lead to the conclusion that the RSA cryptosystem is no l...
Lets's say I have a cipher-module / cryptography-service that signs a hash of some unknown payload. What are the possible attacks that I would need to guard against in this context (primarily assuming RSA algorithm but it could also be EC-DSA algorithm)? With regard to the RSA, to guard against chosen cipher-text attac...
Forgive me if this seems like a trivial question. I've read that AES is a SP network. However, when reading about P-boxes in SPNs they say that they simply shuffle bits around. In AES the ShiftRows step is definitely shuffling bits around, but MixColumns step is not a bit permutation. Does this make AES something more ...
Is there any proof that BLAKE (including 2 and 3) is post-quantum secure? We know that as Merkle–Damgård (with proper padding) preserves collapse sha2 is post-quantum secure. I know that the sponge-based winner of the sha3 competition does not have such a proof. Since BLAKE uses neither of these constructions has there...
From https://csrc.nist.gov/CSRC/media/Projects/post-quantum-cryptography/documents/round-3/official-comments/Classic-McEliece-round3-official-comment.pdf The 8192128 parameter set is bigger, but the 6960119 and 6688128 parameter sets include an extra defense explained in the submission. People paranoid enough to imagi...
In How to prove correct decryption in Paillier cryptosystem, it was asked whether Alice (in sole possession of the secret key) can convince Bob that a given plaintext is the decryption of a ciphertext provided by Bob (who doesn't know its contents). In the case of Paillier encryption, the answer seems to be yes. Is any...
Are there good discussions of how cache pressure impacts large 64k-ish lookup tables used in erasure coding and sometimes signature verification? I'll focus on erasure coding in small characteristic and small degree, which gives a clean extremely performance sensitive application, and avoids off-topic side-channel disc...
Let CS be a combined scheme of $n$ public key subschemes. CS is composed of two algorithms Setup and KeyGen, that all the subschemes share, plus all the other algorithms of each subscheme. Suppose that each one of the subschemes is individually secure in the Random Oracle Model (ROM). I want to prove that CS is secure,...
Assume we using Textbook RSA encryption with the public key $(N,3)$. How can I learn message $m$ if I have the encryptions of $m,m+1,m+2$ in an efficient way? I'm studying for a test and it's a question from one of the tests of the past
Is there any example of a Hash function that is collision-resistant but may not be puzzle-friendly, similarly example of a hash function that is puzzle-friendly but not collision-resistant? Puzzle friendliness: A hash function $H$ is said to be puzzle‐friendly if for every possible $n$‐bit output value $y$, if $k$ is c...
I have been studying ways to amend a simple substitution cipher, and one of the toy suggestions was to use CBC in the following way: identify each letter with a number from $0\ldots 25$ start with a random IV, i.e. just a random letter add IV to the first letter in the plaintext, modulo 26, and then encrypt according ...
I am trying to follow the RFC instructions but am not sure if I understand it. In the RFC there are also some test cases given, although my implementation yields different results. Test Cases: https://www.rfc-editor.org/rfc/rfc8554#appendix-E How is the SEED for private key generation used? It is stated, that LMOTS pri...
Suppose $\mathrm{P}=\mathrm{NP}$ were proven and a practical low-degree (2 or 3) polynomial algorithm was found before widespread quantum key distribution was available. How would internet security work? Presumably, there would be eventually fewer bugs because of formal verification, but everyone would need to use one-...
I am very new to the world of cryptography and have just began my research in the post quantum cryptography sector. I have been reading and trying to understand NTRU key generation and am struggling to understand how to practically do the inverse of f. I know that this is solved using the Euclidean algorithm, but I am ...
Since XMSS only requires a 2nd preimage resistant hash function, is using Blake2 in XMSS possible? It is not in standard, but Blake2 seems to be faster than SHA256
I was thinking about constant-time comparison and how it differs from "==", when I thought of a simple way that's could be constant-time. Being a beginner in cryptography, I'd like to know if my method is secure. This method is probably insecure, but I'd like to know where it's weak. It's really simple. Take the two s...
In this video a group of "hackers" describe how they discovered private keys for the PS3 that was using this ECDSA algorithm by discovering that the "random" integer $m$ (or $k$ in the wiki link) was actually static, allowing the private key to be solved for. The attack is actually mentioned in the wiki link for the al...
I'm aware of existing literature that shows in a comprehensive manner just how simple it is to tweak the ciphertext of AES-CBC such that the decrypted message ends up being entirely different than what it was originally (due to the lack of a MAC to provide AEAD). Can This Be Used to Compromise Encrypted Keys? Specifica...
In 1993, Anderson [1] proposed a backdoor to the RSA key generation algorithm. This backdoor requires that a backdoor key (prime) $A$ be implanted within the key generation portion of the RSA algorithm. Instead of the usual way, primes $P$ and $Q$ are generated using the following algorithm: First define a backdoor pri...
I am working with personal data that contain Identifying attributes such as a player ID and i need to prepare the data for analysis purposes, therefore i need to pseudoanonymize the data beforehand. However, the data should be pseudo-anonymized in a deterministic way in order to always have the same pseudo-anonym for t...
I want to make a double cipher consisting of two encryption method Enc1 and Enc2, and two corresponding decryption mechanisms Dec1 and Dec2. I want it so that: (1) we can encrypt any message M1 to a ciphertext C1 using Enc1 and a key K1, and it can decrypt the ciphertext C1 with Dec1, using the same key to recover M1....
I am studying MASCOT protocol for multiparty computation and I am stuck in the comprehension of the authentication protocol $\Pi_{[[ \cdot ]]}$ and its security proof. Supposing the initialize phase of $\Pi_{[[ \cdot ]]}$ has been called, if one party $P_j$ wants to share some values $x_0, \dots, x_l$ using function In...
I know that the cofactor of curve 25519 is 8. Is it the maximum factor in the existing curve used for ECDSA?
I want to find out how many bit operations are performed for encryption in AES-128 with messages size $128$ bits. For public key encryptions such as RSA and ElGamal, I know that number of bit operations required are $O(n^3)$ if the key considered has $n$ bits. Are these equal to $O(1)$?
According to the "Guide to Elliptic Curve Cryptography" (page 182), it's possible to recover $d$ with an invalid curve attack. How can this value be used once recovered? For example, with Elliptic Curve Diffie Hellman (in TLS for example), what can we do with $d$?
Intro: EC are often compared with RSA but how about a more safe version of the discrete logarithm? All 3 can be reduced to the problem: $$b = g^a \mod{P}$$ In RSA $P$ is a product of two primes. To solve the discrete logarithm 'just' a factorization of $P$ is required. Different to the two other cases $a,b$ is known an...
While sending an EC point we mainly have two options, send it compressed or uncompressed. The uncompressed has prefix 04 and compressed has 02 or 03 which indicates which $y$ to choose. Actually, it is costly, first find the $y$ and $-y$ from the curve equation; $$E(K): y^2=x^3+ax+b$$ a cube and a square root is requir...
In a modern secure encryption scheme, is it possible(both theoretically and practically) to encrypt a message using a key to get the following ciphertext c = Enc(M1,k1) and later find another key so that a different message of my choice gets encrypted to the same ciphertext c = Enc(M2,k2)?
Define three hash functions: $H_1: \{0, 1\}^* \rightarrow \mathbb{G}$ mapping $x$ to the group $\mathbb{G}$ of prime order $q$ $H_2: \mathbb{G} \rightarrow \{0, 1\}^\tau$ $H_3: \{0, 1\}^* \times \mathbb{G} \rightarrow \{0, 1\}^\tau$ Under random oracle model and DDH assumption, I noticed the PRF $H_2(H_1(x)^k)$ defin...
I came across this paper which mentions this table, which states that NTRU 347 is equivalent to 112 bit security level However, in this paper, Choosing parameters for NTRU mentions that NTRU-401 is equivalent to 112 bit security Thus, I would like to ask what parameter of NTRU is equivalent to 112, 128, 192 bit secur...
In 2016, security innovation released the NTRU challenge. I understand that NTRU is now patent free and it seems like most of the documents related to the NTRU challenge on security innovation's website are now not available. Is there an archive where I can access these documents? and is the NTRU challenge still ongoin...
Given the normal discrete logarithm problem: $$a = b^c \mod{P}$$ with prime $P$ and numbers $a,b,c$ For which kind of $P,b$ the NFS/IC algorithm is faster than Baby-Step/Giant-Step+ Pollard's Rho ($\approx \mathcal{O}(\sqrt{q}) $)? (with $q$ the biggest prime in factorization of $P-1$, with $P$ big prime) Or in which c...
For cascading encryption (ie. AES-Twofish-Serpent), the most secure implementation is with mutually independent keys. My question is if it is secure to hash the previous key for each layer of encryption. In my case, Serpent will be the innermost cipher and AES the outermost. password = "my_hopefully_secure_password" ma...
Suppose that $P = pG = H(rK)G$, where $P$ is a point on an elliptic curve, $H$ is a hash function, $rK = kR$ is a shared secret between the party that knows $r$ and the party that knows $k$, and $G$ is a generator point. Is there a way to prove that $P$ is well constructed (i.e., computed from the shared secret) and th...
I'm a building a Web application chat message system(Over TLS) and i would like to know if the following theory is correct. Sender I'm generating keyPairs using RSA and another KeyPairs using ECC. By using ECDH, I get $1$ shared Key from the ECC keyPairs. Using the Shared Key $i$ encrypt the chat message using AES-256...
This question is similar to: [1] Why does my SSH private key still work after changing some bytes in the file? But in this case (on Windows) after editing the authorized_keys file and changing some characters in a public key the login still works ? Is the same reason of [1] ? Some characters in the public key are irre...
I am using the javascript WebCrypto API window.crypto.subtle.deriveKey() API to generate HMAC keys like this: this.key = await window.crypto.subtle.deriveKey( { name: "PBKDF2", salt: someSalt, iterations: 50000, hash: "SHA-1" }, keyMaterial, // default length value! { name: "HMAC", hash:"SHA-...
Or more general: given two valid random cipher $c_0, c_1$ a function $D$ with $$D(c_0,c_1) = (a,b,c)$$ should exist but hard to compute (for most cases). The result $(a,b,c)$ represents the path from $c_0$ to $c_1$ underling an encryption $E$: $$E(x_0,y_0,z_0) = c_0$$ $$E(x_1,y_1,z_1) = c_1$$ In this case $$E(x_1,y_1,z...
There are a lot of questions in these forums regarding the recovery of private keys. But I'm here to postulate on something unique to a specific piece of research that I looked into recently. The paper is located here: https://eprint.iacr.org/2019/023.pdf We all know that repeated nonce values render an ECDSA key insec...
The paper https://eprint.iacr.org/2020/986.pdf proposed a framework for embedding a malicious backdoor in LowMC cipher, that will later help the designer to recover the secret key in the known-plaintext attack setting. As the framework is scalable, suppose a cipher with 16 bit block size of 3 rounds is constructed. The...
I am (perhaps naively) evaluating the security considerations of using the following code to create BIP39 seed phrases (on a read-only and offline Raspberry Pi). Apparently, using jot -r 1 1 2048 is not ideal and I would like to leverage the HRNG (/dev/hwrng) on Raspberry Pi hardware. printf "%s\n" "Create random 24-wo...
I wonder how sound Trevisan's extractor can be against quantum side information. I checked many papers. And all of these papers were aiming to explain how sound Trevisan's Extractor is against quantum side information but they all have the same information; the papers include: what is an extractor? what is a strong e...
I know that the first step in TLS 1.3 with modern signatures is hash the message with SHA256/SHA384/SHA512. Do PQC signatures work the same as modern algorithms in TLS 1.3?
Short version: how is it possible to round a continuous Gaussian into a true discrete Gaussian (usually denoted $\mathcal{D}_{\mathbb{Z},\alpha q}$)? The goal is to obtain a reduction from continuous LWE to a true-discrete LWE and combine it with the reduction from $\textsf{GapSVP}_\gamma$ to continuous LWE. Longer ver...
I am using the AES cipher for my OTT platform. Almost all Chip vendors (ARM, Intel, etc) have built-in AES for faster and secure processing. Now, how feasible it is to move from AES to ChaCha20? What are the pros and cons of this? Will ChaCha20 be faster than in-built hardware support for AES? Can ChaCha20 provide be...
According to specification, to create data that will be signed with server private key for CertificateVerify message, we need to concatenate 64 space characters, the string "TLS 1.3, server CertificateVerify", null and the hash of all handshake messages to this point. During the handshake process, we choosing the ciphe...
I'm studying for my crypto exam and got stuck on following example: Is $F'_k(x) = F_k(0||x)||F_k(1||x)$ with $x \in \{0,1\}^{n-1}$ a PseudoRandom Function PRF, under the assumption, that $F_k$ is a PRF? In the solution, there is a reduction proof stating, that $F_k'$ is a PRF. What gets me confused is the definition fo...
I am currently solving a simple cryptanalysis problem where I need to decrypt a text file using frequency analysis. The text has been encrypted using an affine cipher over a 68 character alphabet which includes lower and upper case English letters, digits from 0 to 1, as well as those characters: ". , ; : _ \n" where _...
The task: The Playfair cipher with $I = J, X$ added into two same letters and the key keep distance. The plaintext: CORONAVIRUS SPREADS FAST The whitespaces in plaintext and key are to be discarded. not sure what they mean by I = J, X The table I am not quite sure what they are asking for. I know that you usall...
The paper The sponge construction as a source of secure cryptographic primitives (see Figure 6) mentions a synchronous sponge mode (working like CTR or OFB modes). So, this type of sponge is a non-authenticated mode. Are there any examples of this type? Another question: What is the motivation of this type of sponge? A...
I already created my own version of the hash based signature scheme LMS, but my signing results do not match the test vectors provided in the RFC. I am not sure what I do wrong, thus I wanted to try to run the reference implementation from cisco, although it is way more complicated, a little bit too complicated for me....
I understand that if the same message is sent to 3 people with $e=3$ that even with different public keys, the message can be decoded using the Chinese Remainder Theorem. I have tried to figure out the steps to do so, but I am unable to actually lay it out even using small numbers. How would one decrypt a message $m$ =...
In [BN07, Subsection 4.3], the authors show that if a symmetric scheme $\mathcal{SE}$ is IND-CPA and a MAC $\mathcal{MA}$ is EUF-CMA (though they use the SUF-CMA notation, but I think it refers to the same notion?), then the symmetric scheme $\mathcal{SE'}$, constructed via the Encrypt-the-MAC technique, is IND-CCA sec...
Yesterday I came across some conversation discussing partitioning oracle attacks, against authenticated stream ciphers like ChaCha20 and Salsa20 with poly1305 for MAC. As I understand it (though the paper is a little dense), the exploit requires: an interactive client/server where messages are encrypted under keys der...
For Elliptic curves defined over $GF(2^n)$, by adding any two points P and Q over $GF(2^n)$ we get the third point over $GF(2^n)$. In Elliptic Curve Digital Signature Algorithm (ECDSA) https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm , there is a usage of prime numbers, particularly for the calc...
everyone! As a beginner, I would like to ask you a question. The best algorithm known for cracking (done by anonymous snooper) this problem (Discrete logarithm problem of elliptic curve or ECDSA)is Pollard’s rho method, and takes about the square root of πp/2, where p is the modulus. My questions are: (1) Elliptical en...
I am starting Tamarin prover, and it is hard to understand. Here is a basic example of my issue: First Code : theory test begin builtins : asymmetric-crypto, diffie-hellman rule Register_pk: [Fr(~ltkA)]-->[!Ltk($A, ~ltkA), !Pk($A, pk(~ltkA)), Out(pk(~ltkA))] rule C1: [Fr(~x)] -->[C1($C, ~x), Out(<$C, 'g...
A recent Paper to appear on USENIX Security 2021 titled as Lord of the Ring(s): Side Channel Attacks on the CPU On-Chip Ring Interconnect Are Practical by Riccardo Paccagnella Licheng Luo Christopher W. Fletcher They were able to use the ring interconnect’s functioning of Intel CPUs previously exploited. They claim to ...
I would love to get help figuring out how to prove the following theorem: If there is an Encryption scheme for a single bit CPA secure then an Encryption scheme can be created along with a variable of bits which is also CPA secure. I built a reduction, $Adversary$ for the single-bit scheme ($A$) that simulating the $Ad...
In this protocol, Q1: how does the commitment work? What if the prover sends $\textbf{t}$ directly, and then sends $s_m,s_r,s_{\textbf{e}}$? Q2: How does the rejection sampling lemma work? refer to this paper Reference
I have a question on the disprove of the CCA-security given in Katz & Lindell's textbook (2nd edition) in chapter 3.7 on page 97. It works like this: Consider our construction based on PRFs: $\text{Enc}(k, m) := (r , s) = (r , F (k, r ) \oplus m)$ Set $m_0 = 0^n$ and $m_1 = 1^n$ Adversary A gets $(r , s)$ and flips th...
While reading Katz & Lindell's textbook (2nd edition) if found three main security definitions: ING-EAV-Security, ING-CPA-Security and ING-CCA-Security. (From this forum I know there are more, but these are the most basic ones). I also read, that ING-CPA-Security implies ING-EAV-Security and that ING-EAV-Security is we...
The partition oracle attacks exploits the non-committing AEAD schemes. Informally, a committing encryption scheme is one for which it is computationally intractable to find a pair of keys and a ciphertext that decrypts under both keys. AES-GCM and ChaCha20-1305 fail on this so they are non-committing. As a countermeasu...
While reading https://crypto.stackexchange.com/a/88732/87450 I noticed that it suggests encrypt-then-HMAC as a defense for partition attacks. However as far as I know unlike poly1305, HMAC does not make use of nonces and in the poly1305 paper DJB says: There are several reasons that Poly1305-AES uses nonces. First, co...
Is encrypting $h(k)$ (or even just $k$) and verifying it before checking the MAC enough to defeat partition oracle attacks and thus make the whole scheme robust/committing (without depending on properties of the cipher, unlike 0-padding)? update 1: basically $E_k(h(k)\mathbin\|m)$ or $E_k(k\mathbin\|m)$ where $E$ is an...
I'm trying to find a Python library that implements Elgamal Encryption on the Elliptic curve i.e X25519 or P-256. My purpose is to use the additive homomorphic property of Elgamal. I'm using https://github.com/data61/python-paillier Python library for Paillier to have additive homomorphism. However, since I'm only encr...
I encountered this while solving a crypto puzzle. This is the puzzle. You have a hash which gives a 11-bit output. How many minimum messages do we have to hash to have a 50% probability of getting a collision. Normally we see kind of problem being solved by using an approximation $2^{n/2}$ or $\sqrt {2^n}$ So for a 11-...
I was asked about the following variant of $ElGamal$ Encryption Scheme (Preparing for exam): Instead of encrypting $(g^r,h^r*m)$, encrypt $(g^r,h^r+m)$. And the question is whether the new variant CPA secure? In addition, is it Homomorphic in relation to addition or multiplication? Regarding the question of whether is ...
While reading Katz & Lindell's textbook (2nd edition) I found a proof for the CPA-Security of CTR-Mode. It can be found at the end of chapter 3.6.2 (page 93 and 94). I don't quite understand, why the proof is that complex, so I got two basic questions about it: Why is the extra Scheme (cryptosystem) based on a true ra...
I'm trying to implement a simple command-line tool to calculate the (Key Check Value) KCV of some encryption keys. The algorithm for the KCV is simply to encrypt a block of 8 zeros with DES and get the first three bytes of it (this is called VISA KCV, and there are a bunch of other KCV algorithms). So, I wrote this cod...
Dan Boneh's Crypto 1 Course includes a lesson on stream ciphers with the following slide: He asks the question: And the answer he gives is $m \oplus p$, which is why this is insecure. But I don't see why this is correct. If: $m = 0011$ $k = 1100$ $p = 1010$ then $$m \oplus k = 1111$$ and $$(m \oplus k) \oplus p = 0...
I'm writing a function that will allow me to analyze the randomness of some input data and return some stats about the probability of this data to be random. Obviously it should be based on two things: How often each byte value is found / not found (randomness / distribution) And how much data we have (certainty) S...
Suppose an encrypter separately produces three ElGamal ciphertexts $c_1 = E(m_1)$, $c_2 = E(m_2)$ and $c_3 = E(m_3)$, which encrypt the messages $m_1$, $m_2$ and $m_3$, respectively. Is it possible for the encrypter to prove with a zero-knowledge proof that $m_1$ = $m_2 \mathbin\| m_3 = m_2 \times 2^{32} + m_3$, i.e., ...
How many NVidia 3090 would you need to brute force a 1024 key in one day?
I currently have the following information and I assume the first line separated by the: represents the prime number and generator. Is there any way I can find the secret key shared for the Diffie-Hellman key exchange with only this information? 43223423423:34234234242443423423 Alice's Public:OTEONZJTYZTOCTMETYDMQNMNC...
I am working with the RFC for Leighton-Micali Hash-Based Signatures: RFC-8554. The question is if I understood it correctly and my calculations of the key sizes are correct. Basically, LMS uses several Winternitz-One-Time-Signature keys. Winternitz-OTS In chapter 4.1 of the RFC the parameter sets of the OTS keys are m...
The question is pretty self-explanatory but basically I just want to ask if, when choosing the p and q primes that, when multiplied, become the modulus for an RSA public key, is there a risk that attackers can exploit if p and q are equal to each other? The only requirement that I've seen up until now is that both p an...
https://www.microsoft.com/en-us/research/blog/password-monitor-safeguarding-passwords-in-microsoft-edge/ In this they mention The server then evaluates a matching function on the encrypted credential, obtaining a result (True or False) encrypted under the same client key. The matching function operation looks like thi...
I've been told that oracles are always servers and that oracle attacks are always online, but I'm not convinced that's true. However, I have limited understanding of this topic since I'm still learning and the book I just read didn't discuss it at all. The definitions I've seen of the term don't specify whether oracle ...
I'm currently trying to create a lua script that can handle encrypting and decrypting using RSA, but when decrypting, the program takes an extremely long time, whilst when encrypting, the program is done within a matter of milliseconds. Currently, I'm wondering: How many bits should p and q be? How big should pq be? H...
From what I understand, CTR works by taking a counter, concatenating it with a nonce, and encrypting the result, which gets XORed to the ciphertext. For a 128-bit block cipher (ie. AES), my understanding is that the first 8 bytes of the CTR block is the nonce, and the second half (bytes 8-16) is the counter. CTR is a s...