instruction
stringlengths
32
27.2k
For secrecy, authentication & integrity, you can either use CipherText = Encrypt(PlainText) Signature = Hash(PlainText) CipherText = Encrypt(PlainText) Signature = Hash(CipherText) Either case, you send both CipherText & Signature to the receiver. What is the advantage of one method over the other? Does it differ...
Is there a recent and comprehensive survey on zero knowledge proofs? I'm trying to find one which provide more details than the two chapters (19/20) in Boneh and Shoup's book (a grad course in applied cryptography)
NIST SP 800-90B offers various tests for estimating entropy. They also offer an implementation of these tests. With their program called ea_iid, estimating entropy is very easy. $ ea_iid random.dat Calculating baseline statistics... H_original: 7.884314 H_bitstring: 0.998545 min(H_original, 8 X H_bitstring): 7.884314...
Say I have a file containing words from the English language. Not meaningful text, just a repetition of a few words. The original size is 1559454 bytes and it is compressed by a certain program to 75742 bytes. (A very good compressor, it seems.) Can I estimate the entropy of the source producing such file using ess...
Say I want to generate a deterministic private key related to some data, for instance to a domain name. The easiest way I can think of is: take a secret material which will work as "generator". take a domain name and HMAC-SHA256(my secret, domain name). take resulting hash and use it directly as secp256k1 private key....
In a situation in which A handles a message P for B to sign using ECDSA, and that event repeats itself many times, is there a way A can discover B's private key? A can carefully choose what will be P every time, and be confident that B is always the same person using the same key to sign. Does it change anything if P i...
My question is probably both philosophical and technical. Background I was developing a CSPRNG, and I needed to shuffle the bits in one step in the middle of the algorithm - any naive shuffle would suffice. I had this question in my mind: Why would be any difference if one chooses to confine to a "shuffle" algorithm (s...
This question seems to touch on the apparent fact that NIST SP 800-90B is not suitable for estimating entropy produced by sources that are not uniform, despite being IID or non-IID. It also seems that most phenomena for producing entropy are not uniform. If that's indeed right, then naturally one wonders what adequat...
What are advantages/disadvantages for using a CMAC that proofs the integrity and authenticity of a message but doesn't encrypt the payload itself? Why should it be used instead of symmetric encrypted payload and CRC (CRC is encrypted as well)? This could also proof authenticity, integrity AND confidentially. From my po...
Suppose mechanism $M$ is $(\epsilon, \delta)$-differentially private. For datasets $x$ and $x''$ that differ by 2 elements, we have $$ Pr[M(x)=y] \le e^{\epsilon} Pr[M(x')=y] + \delta \le e^{2\epsilon} Pr[M(x'')=y] + (1+e^\epsilon)\delta $$ where $x$ and $x'$ are adjacent, $x'$ and $x''$ are adjacent. This bound is th...
Comments on Cryptographic Entropy Measurement seems to challenge the heart of NIST SP 800-90B, which proposes min-entropy as a conservative measure of entropy produced by hardware source. [The idea of using min-entropy] has been taken to heart in the NIST SP 800-90 documents, using the most conservative measure, min-e...
There exists a function $f$ such that if one-way functions exist then $f$ is a one-way function. Such a function is called a universal one-way function. Now the public-key encryption schemes that I’ve come across use functions for which it is an open problem whether they are one-way functions even under the assumption...
This classic paper by Chor and Kushilevitz shows that if the key space and the message space are both countably infinite, then it is impossible to have a perfectly secure private-key encryption scheme. Their proof relies on the fact there exists no uniform probability measure on the set of natural numbers, which in tu...
This is probably a silly question, but I could not find any reference. For the DDT of an SBox, it is easy to see why all the values are even. Is there any related result for LAT (i.e., all its values are even)? LAT, for an $n \times n$ SBox, is a $2^n \times 2^n$ matrix with row $\alpha$ and column $\beta$ defined as f...
Is that proved that breaking ECDSA (Elliptic Curve Digital Signature Algorithm) as hard as solving ECDLP(Elliptic Curve Discrete Logarithm Problem)?
I am having a first look at the TLS key exchange using Diffie Hellman and try to understand the Elliptic Curve variant of it. So if a client and a server agree on using ECDH for key exchange and they use the secp256r1 curve, it seems like the base point G is given and they take it from the standard (04 6B17D1F2 E12C424...
For the q-SDH problem, given the generator $g_1$ as a point on the elliptic curve, I can picture the $\beta g_1, \beta^2g_1, ..., \beta^qg_1$ since we can simply do the point adding $g_1$ multiple of $\beta$ times. However, I cannot picture the point $\frac{1}{\beta+x}g_1$ (for some $x \in Z_p $). Is $\frac{1}{\beta+x}...
By running some tests I observed that if I perform a homomorphic division (multiplication with the multiplicative inverse) between two values using the ElGamal scheme, I get the correct result when the division produces a whole number. For example, D(E(10) / E(2)) = 5 which is the expected result (here "/" denotes divi...
Ciphers like PRINCE or LED seem to use identical round keys. Does anybody know other cipher (may include hash functions, MACs or AEADs) that has the same property?
If I understood correctly, some symmetric ciphers such as AES, Camellia, ChaCha are implemented in OpenSSL (along with several older ones) but some other commonly used and proven ciphers such as Serpent, Twofish and Threefish are not. Any way or chance of these being supported by OpenSSL as well? Or is there another de...
I have generated the nine datasets according to this document for AES-128 and testing these for randomness using NIST STS. However, the results are inconsistent. Sometimes there appear a * in the result files and sometimes it doesnot. Even the result files show different values on multiple testing of the same file. Why...
When applying several tests to a given generator, p-values smaller than 0.01 or larger than 0.99 are often obtained by chance even if the RNG behaves correctly with respect to these tests (such values should normally appear approximately 2% of the time). In this case, suspicious values would not reappear systematicall...
Basically I need to have a base64 encoded signature that has to be 96 characters long. However, I do not know what length I need to have the signature at so when I encode it, it can be that exact size. Does anyone know how to convert it? Also, does anyone know how to convert it in base64 encoding or any byte size encod...
https://drive.google.com/drive/folders/1MfK8-Fv5Y7rcRz1Cp_swsZhJcgcILmyd?usp=sharing * Someone out there has built a book cipher using permutations of the book. The basic premise seems to be that a book which is half a million words long can be rearranged in 10**2000000 ways (the factorial of half a million). A text ...
For example perhaps deriving the same PRF from RSA signatures on different messages from a (not known) private key? Struggling to find the proof of why not.
We typically model a hash function (in particular $\mathrm{SHA}$-$256$) as a function $H:\{0,1\}^{2^{64}-1} \to \{0,1\}^{256}$ with some special properties that makes them useful in practice. In this case, the probability for a collision is around $2^{-256}$ which is assumed to be infeasible in practice. Now (because $...
Suppose we have an $n$ bit block cipher $E$ with a key $k$ that has the following property $$E(k; m_1⊕m_2) = E(k;m_1) ⊕E(k; m_2).$$ How many minimum number of chosen plaintexts are required to decipher (with probability 1) a given ciphertext (not from the list of ciphetexts corresponding to the chosen plaintexts) witho...
I have heard that ECDSA will be broken in the not-to-distant future (roughly 15-25 years) by Quantum Computers running Shor's Algorithm. However, to my understanding, the only purpose of Shor's Algorithm is quickly finding the prime factors of very large numbers. Though time consuming, such factorization is by no means...
In NIST standard (NIST SP800-57), the bulk data encryption key and other key material that is used frequently have a short lifetime. As quoted from (Sec. 5.3.6, point 6.b.): The originator-usage period recommended for the encryption of large volumes of data over a short period of time (e.g., for link encryption) is on...
after creating CSR using openSSL with secp256r1 curve inspecting the file using openssl asn1parse -i -in ecTest.csr the size of the signature is 73 bytes, why? I think the ASN.1 of the signature is ECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s INTEGER } and for secp256r1 that r and s are 32 bytes each which means 1...
Let the subgroup $G$ of elliptic curve constructed with point $P$ with prime order $q$ by $G=\langle P\rangle $. The $h(x)$ is a hash function. We want to map the hash of arbitrary message $m$ to a point in $G$ for use in the signature algorithm (such as BLS). Why we don't use $k=h(m) \bmod q$ and then $S=kP$, whereas ...
I am looking for some help regarding something I am trying to do and I think to solution might be in Homomorphic encryption. Person A and B encrypt the same number(unsinged long) N using AES with different keys. Person C runs a transformation function TF based on some random secret input S on both cyphertexts. A and B ...
I'm struggling to understand the high-level idea of "Verifiable Delay Functions from Supersingular Isogenies and Pairings" (https://eprint.iacr.org/2019/166.pdf) by De Feo et al. I will shortly outline the construction (p.12): setup: (choose appropriate parameters) Select a supersingular elliptic curve $E/\mathbb{F}_p...
Now that Keccak has been chosen as SHA-3 we see that there have been defined quite a few related modes, including authenticated cipher modes, the KMAC message authentication mode, XOF's and whatnot. However, it is unclear to me how much this fills all the gaps for symmetric cryptography. Could we for instance define an...
Problem Definition: Alice wants to send a matrix $MR_A$ which encrypts its original private matrix $M_A$ ($M\times N$ size, all elements in $M_A$ is in {0,1,2,3,4,5}) to Bob without letting Bob knows any information about $M_A$. Security Definition: Alice and Bob communicate via a secure channel(no need to consider the...
There's no doubt that the BBS Signature was born from this classic Short Group Signature paper in 2004. It's capable of Zero-knowledge. In the paper, section 5, it describes how a member of a group, can sign a message, without revealing which member signed it. But, this group signature can be verified that it was signe...
There already exist interactive proof protocols with logarithmic communication for proving that a secret multi-exponent $x ∈ Z^{n}_{q}$ for a public multi-exponentiation $P = \textbf{g}^{\textbf{x}} ∈ G$ is mapped to a given public value y under an arbitrary but given group homomorphism $f : Z_{q}^{n} → G_{T}$, where $...
In the BLS signature the subgroup $G$ of elliptic curve constructed with point $P$ with prime order $q$ by $G=\langle P\rangle $. The $h(x)$ is a hash function. The point $S$ is map (image) of $h(m)$ on elliptic curve. The signature is multiplying the private key in the point $S$. Is the point $S$, also in $G$ and a m...
What will happen if the Initialiazation Vector (IV), i.e, the initial randomness fed in to the first block arrives mangled at receiver end? How will this affect the decryption? Will the receiver be abl to decrypt all blocks correctly? Or none? Or some?
I have been reading about MDS matrices. It is defined as (paraphrased from Section 2.1) An $n \times n$ matrix $M$ is MDS if and only if $bn(M) = n + 1$ where $bn$ (branch number) is defined as: $bn(M) = \min_{u\neq0}({hw(u) + hw(Mu)})$ where $hw$ denotes Hamming weight. It seems the MDS matrices like that of AES are...
In IKEv2, SKEYSEED, which is used to as a seed for generating the rest of the keys, is generated as SKEYSEED = prf(Ni | Nr, g^ir) In other words, we invoke a pseudorandom function with the concatenation of the initiator and receiver nonces (that are sent in the clear) as the secret, and the Diffie-Hellman shared secret...
One of the approaches in order to prevent Sybil or DoS attacks is CPU-bound PoW. However, because of the influence of Moore’s law, the memory-based approaches are suggested. As actually there are two different terms: (1) memory-hard functions and (2) memory-bound functions; Does it mean that we have two different memor...
I studied Schoofs Algorithm described by Washington. On page 125 he says that we could write $y'/y$ as a function of $x$, which makes sense since earlier on the page he denotes $y'= r_{2,j}(x)y$. But I can't find any definition of $r_{2,j}(x)$ although he referenced p.47. So what would be the definition of $r_{2,j}(x)$...
Im new to cryptoanalysis and started reading A Tutorial on Linear and Differential Cryptanalysis. The author is trying to explain it as simple as he can. But I still got some questions, can anybody help me please? He uses this example of simple spn. As far as I have understood if we dont use k1 we just skip all S1 sbo...
I'm trying to understand how differential analysis works. I'm reading this and this tutorials, but it looks like they do different things. In the first paper author tells us to bruteforce last round using every possible keybits for active sboxes and traces differential up to r-1 round. In second work differential goes ...
Let's consider linear congruential generator: $X_{k+1} = a \cdot X_{k} \mod 2^{128}$ Such that $a$ is some number which for every 128-bit input $X_{k}$ from $0$ to $2^{128}-1$ will give us different output $X_{k+1}$ from $0$ to $2^{128}-1$. So we got bijection here (we can find many such $a$). Now let's say we will cho...
I am trying to understand the encryption and decryption process of the APE: APE: Authenticated Permutation-Based Encryption for Lightweight Cryptography Full paper The Encryption what is exactly the Vc and the Vr here? Example instead of the permutation p, what if I decide to replace it with a block cipher? Will the V...
I am wondering whether or not it is known that the following problem is computationally infeasible while working in a group for which the DDH (or CDH or DL) assumption holds (as usual, g is a group generator): Given the input tuple $(g, g^{\alpha_1}, g^{\alpha_2}, g^{y}, g^{z})$ where $z \in \{y \alpha_1, y \alpha_2\}$...
I have studied Shamirs Secret Sharing(SSS) scheme. Now my doubt is to how to apply this in real time applications. I have an application which receives encrypted data from server and decrypts the data with the help of key which is stored in this application. I wanted to secure this key in the application with SSS. How ...
In the paper for curve25519 is described how the prime was chosen. But I don't understand why the biggest 255-Bit prime was chosen instead of a 256 Bit prime. Can someone explain this to me?
In https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf page 27, it is said that ...the total number of blocks of plaintext and AAD that are protected by invocations of the authenticated encryption function during the lifetime of the key should be limited. A reasonable limit for most applicati...
Suppose one had no computer (or rainbow tables), but had access a pen and paper as well as all the necessary documentation for modern (best practice, not outdated) hashing algorithms and mathematical formulae. How long would it take to compute the hash of a password? Define password a random 8 character string of char...
So I've read stack overflow questions like this one. What I'm wondering is a bit more specific though: I'm really liking what I'm seeing with BLAKE3. (I suspect that this hash function is relatively unknown, though that's not surprising given its newness.) This would, however, also apply to BLAKE2 (and maybe BLAKE, I'm...
The following code generates a deterministic stream of pseudo-random bytes, using SHA3. use sha3::{Digest, Sha3_256}; pub struct ShaStream { passhash: [u8; 32], nonce: [u8; 32], index: u64, block: [u8; 32], hasher: Sha3_256, } impl ShaStream { pub fn new(passhash: [u8; 32], nonce: [u8; 32]...
Are there any elliptic curves defined over a finite field $\mathrm{GF}(p^k)$ with a subgroup of order $p$ where the discrete log (and preferably DDH) problem is hard? Elliptic curve with prime subgroup equal to field size answers this question in the negative when $k = 1$, but Hasse's theorem doesn't rule out e.g. curv...
I'm trying to get a random number for a STM32L0x1 MCU to use it in protocol SRP6a. (I know that there are MCUs with an embedded hardware random number generator. But it would cost twice as much as the MCU I'm using right now.) Now some questions arise: Would a "bad" random number seed (like reading values from ADC) ne...
I'm a complete novice at this and in need of advice. I'm building an app that I've implemented a password encrypted backup feature into. I'm wondering about the best practice for handling the salt. With a centralised database I know that it's essential to have a random salt as a defence against hackers, but what about ...
The MD5 algorithm is designed to accept a message of any length and produce a 512-bit message digest. Because of the way it pads the original message, by adding a 1-bit then a number of 0-bits, the length of the message can be any number of bits. It is not limited to an integer number of bytes. But it can also be writt...
I am trying to understand what is AEAD exactly. I am application developer not a cryptographer. I have been searching online for a while watched a bunch of Youtube videos, read through a couple of books "Serious Cryptography" and "Understanding Cryptography" but found the AEAD explanations to be too terse. My goal is t...
I'm given a large prime $p$ and $c \equiv m^e \pmod p$, and $e = 2^{64}$. Typical RSA rules don't apply here, since $\phi(p) = p - 1$ is even, and $e$ is a power of two, so they share a common factor, specifically $\gcd(\phi(p), e) = 2^{30}$. I was thinking of applying repeated modular square-rooting, and since $p \equ...
I'm reading RFC8291. Here's a figure on how Web Push Notifications work in general: +-------+ +--------------+ +-------------+ | UA | | Push Service | | Application | +-------+ +--------------+ +-------------+ | | ...
I am reading Junod's paper about the Blum-Blum-Shub PRBG (BBS) and I am having trouble following his reasoning at on page 15, where he argues that the next-bit test can also be peformed for the previous bit in the bit sequence $b_0b_1 \ldots b_k$ , i.e. an attacker can also try to predict $b_{-1}$. If I understand him ...
There are may papers and notes explain why CBC-MAC is only UF-CMA secure for fix length messages. Are there any other blockcipher-based (blockcipher and hash combined included) MACs that is UF-CMA secure with variable length messages?
Problem statement: "Bob is a paranoid cryptographer who does not trust dedicated hash functions such as SHA1 and SHA-2. Bob decided to build his own hash function based on some ideas from number theory. More precisely, Bob decided to use the following hash function: $H(m)= m^2\bmod n, n= p\times q$, where $p$ and $q$ a...
What is the effective key length of a deterministic encryption scheme, given a meet-in-the-middle attack scenario when you encrypt five times (64 bit keys for each)? . Say the encryption scheme has |key space K| = |plaintext space M| = |ciphertext space C| , all keys are 64 bit length, and $k1,k2,k3,k4,k5$ are all diff...
Let $G$ be a group, and let $a, b\in G$, and let $[3] = \{0,1,2\}$. Let $(x_i,y_i)$ for $i\in[3]$ be known constants. Assume that I know the elements: $$c_i = a^{x_i}b^{y_i},\quad i\in[3]$$ Then, given $(x', y')$, is there a way to efficiently compute $a^{x'}b^{y'}$?
If we look at the use-case that our sequence counter within our TLS communication is only 32-bit, would an automatic key re-newal be necessary a lot more frequently? We're going to use state-of-the-art algorithms consisting of AES-GCM (at least 128-bit keys) and HMAC-256. I'm referring to the answer posted here - https...
Is there any idea about calculating the exact Voronoi regions of lattices with dimensions $\leq 16$? Thank you!
If I understand correctly, the identity point on all elliptic curves is the point at infinity. But on the Edwards curve, this can be written in Affine form? Does this have something to do with the fact that Edwards curve formulas are complete? What would the point (0,1) be on the Weierstrass curve signify? If b=1, th...
I'm creating a password vault, and I plan to use Argon2id to derive the master key from the master password. For encryption, I plan to use XChaCha20 with Poly1305. To be clear: a set of multiple passwords and usernames will be encrypted using XChaCha20 and authenticated using Poly1305, using (a random 192-bit IV and) a...
For example, what are the odds of this happening: Can this even be calculated?
I hope this is the right place for that kind of question. So actually I am trying to test the TLS implementation of some industrial device. I have to write my own TLS implementation for this, for which I am using the OpenSSL library and I also do testing via console commands, the version is 1.1.1f. The device I test on...
The Symmetric-key algorithm article from Wikipedia states: The keys may be identical or there may be a simple transformation to go between the two keys. I am not aware of any symmetric-key cryptosystem that uses different keys for encryption and decryption. What are some examples of such algorithms? Is this correct t...
In On Ideal Lattices and Learning with Errors over Rings, the authors prove a search-to-decision reduction by guessing the RLWE secret $s$, and using the guess to transform a sample from $\mathfrak{q}_{i}$-$\mathrm{LWE}_{q, \Psi} \text { to } \mathrm{DecLWE}_{q, \Psi}^{i}$ (Lemma 5.9). They say nothing about the proper...
What is the difference between Special Honest Verifier Zero-Knowledge (SHVZK) and Honest Verifier Zero-Knowledge (HVZK)? Sometimes I see one term being used, other times the other. Do they mean the same thing?
Using paillier encryption, $N$ is the product of two large prime numbers, $s$ is sampled randomly from $Z_{N^2}$ we get $ C \leftarrow g^ms^N \bmod N^2 $ where $g=1+N$, By multiplying the cipher $c$ and a prime number $B$, we get the following equation: $g^az^N = CB \bmod N^2$ Is it possible to compute the value of $a$...
Given the parameters which include: tree height, Winternitz parameter, security parameter, SHA-512 or SHA-256, tree level, how do I optimize the scheme to output a small signature? The idea is to reduce latency of Extended Merkle Signature Scheme to be use in bitcoin cryptosystem.
I apologize for the theoretical nature of this question, but It has cost me a lot of sleep over the past months. Querying my immediate peers has so far failed to produce results. I assume this question belongs to the domains of Cryptography & Game-Theory, hence I hope to be in the right forum. Question Is it possible t...
Which column type is best for storing $tag, $iv, $key, $encryptedData generated by openssl_encryption, and in which format I should save these values? I am using "aes-128-gcm" cipher method.
So i came across three padding scheme for RSA: PKCS1, PSS and OAEP. My intention here is to encrypt a file using AES key. then, encrypt the AES key with the RSA key and save the encrypted AES key along with the encrypted file. My question is which one of the padding schemes above best suits my purpose. Needless to say ...
I am to decrypt the ciphertext YVBCXGJRYHHRCJIUL into its plaintext message. The information that I am given is that the key used in the cipher is very long (equivalent to the length of an entire book) and that the key is certainly longer than the message being encrypted. The only other information I know is that the m...
In a ctf, I encountered this problem: from Crypto.Util.number import getStrongPrime, getRandomRange N = 1024 def generateKey(): p = getStrongPrime(N) q = (p - 1) // 2 x = getRandomRange(2, q) g = 2 h = pow(g, x, p) pk = (p, q, g, h) sk = x return (pk, sk) def encrypt(m, pk): (p,...
Assuming I have multiple symmetric keys on specific machine(more than 10000 probably), can I use the same rsa key to encrypt all of those keys? I'm a bit concerned from a situation where multiple encrypted keys will have similar pattern and will leak data about the original ones
In the X3DH specification of the Signal Protocol it mentions having a signed pre-key in the key bundle. This pre-key is signed using the identity private-key. Because the identity private-key is in the X25519 Montgomery form, it cannot be used as a signing key. Therefore signal implements XEdDSA to overcome this and co...
I recently started studying cryptography but I am not sure I quite understand the concept of proof by reduction. Question I am trying to solve is as follow: Suppose $\Pi$ is a symmetric encryption scheme which $ C \subseteq M$ ($M$ is message space and $C$ is ciphertext space). then we have $\Pi'$ with same key generat...
In crypto papers, cryptanalysis of MLWE/RLWE/etc. is often reduced to LWE. Why can we do this? Is there strict proof of such reductions?
I recently studied a Hash function and its security requirement. I have studied that simple hash construction from XOR is weak. My question is, based on Xor property the following Hash based on RSA Mi<n calculated by $H(M_1,M_2)=(M_1^e \bmod n) \oplus (M_2^e \bmod n)$, where $(n,e)$ is an RSA public key. satisfy the co...
According to Wikipedia: TLS has a variety of security measures: Using a message digest enhanced with a key (so only a key-holder can check the MAC). The HMAC construction used by most TLS cipher suites is specified in RFC 2104 (SSL 3.0 used a different hash-based MAC). What hash-based MAC did SSLv3.0 use? How does i...
Is there such a cryptography where I can prove that someone decrypted an encrypted string? Say I wanted to attach a Bitcoin private key in some type of digital container, but in order to open this digital container, I would need to break a digital seal. I'm basically trying to find a digital equivalent of how a securit...
Some weeks ago, I read an article about an interesting boolean function with some applications to cryptography. Then, I forgot about the article and now I cannot find it. Hence here I am asking if someone is familiar with this function and can give me some references. Thank you in advance. Fix a positive integer $n$. T...
Provided that: $AES(plaintext, key)$ is the standard AES block cipher for a 128 bits block. $\oplus$ is the standard XOR operation. $K$ is a constant 128 bits pseudorandom value, which is used as the key for AES operations, unknown to the attacker. $A$ is another constant 128 bits pseudorandom value, unknown to the at...
Suppose we have a set of $N$ parties. I am looking for a scheme to generate shares of a random secret $s$ where any subset of the participants with size $k$ can recover the secret similar to Shamir's scheme. Additionally, no party outside of the group, such as a dealer, has access to $s$.
Matrix cipher is defined by: a) Encryption: $C = K \times Z$, where $C$ is a cryptogram vector, $Z$ is a message vector and $K$ is encryption matrix (encryption key) b) Decryption: $Z = K^{-1} \times C$, where $K^{-1}$ is decryption matrix (decryption key), which is inverse to matrix $K$. Is the matrix cipher symmetric...
When knowing the full content of the original message, will I be able to derive the private key from the encrypted message when the underlying encryption uses a fixed initialization vector? Meaning if we encrypt by Text UNENCRYPTED x Private Key =[fixed IV]=> Text ENCRYPTED, can we somehow calculate the key backwards b...
I am currently working on a problem where an attacker knows that a user's password is either "pqrs" or "jmlo" and also knows that the encryption scheme is using the Vigenere cipher with a key length of 2 (Obviously, the attacker also knows the ciphertext). I must either describe how to find out with 100% certainty that...
I've seen the following two definitions of perfect secrecy for an encryption scheme (Gen, Enc, Dec). Pr[M = m | C = c] = Pr[M = m] for all c, m, M and C Intuitively, this means that if the adversary trying to guess the plaintext, gets no information from the ciphertext. Pr[k <- Gen | Enc k m1 = c] = Pr[k <- Gen | En...
When I learn PBKDF2, I found out most of the articles say that the PBKDF2 use HMAC as PRF. Why is HMAC? Can I use other pseudorandom functions? Is HMAC safer than any other functions for PBKDF2?
It is well-known that to make the result of a $\mathbb{R}^d$-valued query $(\varepsilon,\delta)$-differentially private, you can add noise to it. If you add Laplace noise, you need to scale the noise by the $L_1$-sensitivity of the query; if you add Gaussian noise, you need to scale it by the $L_2$-sensitivity instead....
In practice, the circuit need to be proved always has a large size, maybe nearly billion gates, when turns such circuit to QAP, it will generate a large polynomial, which is a high cost to use zkSNARK. So, could the circuit be decomposed into different sub-circuit to reduce the scale of the circuit and also the scale o...
Let $\mathcal S=\{0,1\}^n$ be the set of bitstrinsg of $n$ bits (for security parameter $n$). Let $P$ be a public Pseudo-Random Permutation of $\mathcal S$, efficiently computable in both directions. Construct a block cipher $E$ with message and key domains $\mathcal S$ as $$\begin{align} E:\mathcal S\times\mathcal S\t...