instruction
stringlengths
32
27.2k
I'm thinking of cryptographic implementations on garbage-collected (gc) languages/runtimes and that the gc process can be potentially dangerous for an implementation even if the implementation has the "constant-time" property. Imagine the following code for example: { x = {big chunk data that are not referenced any...
We have a set of secrets $S = \{x_1, x_2, \dots, x_n\}$ known to an adversary. Each $x_i \in S$ belongs to user $u_i$ who needs to obfuscate his secret using the notion of $d-$privacy defined in the following. We assume that we have a numeric function $d(x,x^{\prime})$, giving the distinguishability level between $x,x...
As you may know, classical ciphers are now often broken with hill-climbing algorithms. The earliest mention of them in cryptography I could find occurs in some 1980s publication mentioning 1979 PhD thesis of M. Hellman's student Dov Andelman titled "Maximum Likelihood Estimation Applied to Cryptanalysis" (available at ...
I'm reading inner product from generalized sumcheck in baloo paper (P.13), I'm confused with $\lambda_j(0) = N^{-1}$. Can anyone shed some light? Here's excerpt from the paper The intuition is that for all Lagrange interpolation polynomials $\{\lambda_j(X)\}_{j=1}^{N}$ corresponding to a multiplicative subgroup H of s...
We have a set of secrets $S = \{x_1, x_2, \dots, x_n\}$ known to an adversary. Each $x_i \in S$ belongs to user $u_i$ who needs to obfuscate his secret, i.e. $K(x_i) = o_i$, using the notion of $d-$privacy defined in the following. We assume that we have a numeric function $d(x,x^{\prime})$, giving the distinguishabil...
Context I've used OpenSSL to encrypt some socket communications. I am however using some functionality from the windows API that prevents me from using OpenSSL's opaque builtin sockets, so I am buffering through their BIO_s_mem interfaces - that requires 4 extra copies for all data passing through (socket->read buffer-...
I'm a beginner in cryptography, currently focusing on AES GCM, specifically the GF(2^128) multiplier which employs the irreducible polynomial x^128 + x^7 + x^2 + x + 1. I try to explore the transformation of GF(2^128) into composite fields, like GF((2^64)^2) or GF(((2^32)^2)^2), through isomorphic matrices. However, I'...
Greetings from a newbie and crypto ignaramus. I hope that this is an appropriate forum for this question - please advise if not, or feel free to move it to another SE section. First heard of chaffing years ago when government agencies were trying to ban PGP etc. from civilian use, especially internationally. With compu...
Unconditional zero-sharing was presented in the following paper Practical Multi-party Private Set Intersection from Symmetric-Key Techniques, by Vladimir Kolesnikov, Naor Matania, Benny Pinkas, Mike Rosulek, Ni Trieu Unconditional zero-sharing allows all parties to obtain a share corresponding to each element in the...
What's actually the difference between a (noisy) CVP and LWE? It seems to me that both are the same. With the definition of LWE: $$A * s + e = b$$ solving for secret vector s is the same than solving for the coefficients of the CVP, or do i understand something completely wrong?
I am currently working on a project involving RSA-PSS (Probabilistic Signature Scheme) for digital signatures. While researching potential vulnerabilities, I came across the well-known Bleichenbacher attack, which primarily targets PKCS1 v1.5 padding. My understanding is that the Bleichenbacher attack is not applicable...
I am a professional developer with a mathematics background, but know next to nothing related to cryptography. I would like to know if the following scenario is even possible. Let's say Alice and Bob each have a bitstring of length n. Alice sends her (encrypted) bitstring to a (maybe vulnerable) server where it is stor...
I'm studying generalized sumcheck in RZ21 P.10 and have come across a modular equivalence that I'm trying to understand. The specific step that's unclear to me is the following equivalence: $$ \left(\sum_{\mathsf{h} \in \mathbb{H}} P(\mathsf{h}) \lambda_\mathsf{h}(X)\right)\left(\sum_{s \in \mathcal{S}} \lambda_s(v)^{...
There is a two-party computation protocol based on 2-out-of-2 additive secret sharing in Figure 1. Party $P_0$ holds secret shares $[a]_0, [b]_0$, and party $P_1$ holds secret shares $[a]_1, [b]_1$ where $[a]_0 + [a]_1 = a$ and $[b]_0 + [b]_1 = b$. We assume that $P_0$ and $P_1$ have obtained Beaver's triples $([u]_i, ...
Imagine a simple auction made with Pedersen commitments rather than sealed envelopes. Participant 1 commits their bid, $b_1$, choosing a blinding factor $x_1$ and using publicly known G and H generators. As they do so, the commitment value $C_1$ appears on a public website. Participant 2 does the same. Again, as they c...
Suppose that $(\mathrm{Gen},\mathrm{Enc},\mathrm{Dec})$ is a secure encryption scheme. Encryption scheme is secure if for any two sequences $\{a_{n}\}_{n\in\mathbb{N}},\{b_{n}\}_{n\in\mathbb{N}}$ of messages such that $|a_{n}|=|b_{n}| = p(n)$ $\mathrm{Enc}(k,a_{n})$ and $\mathrm{Enc}(k,b_{n})$ are computationally indis...
I am a beginner in cryptography (on my way to retirement) and have programmed the Trivium algorithm in C++ for practice. To check if the bitstream generated by my program is correct, I am looking for some bitstreams with given key ind IV. I think 200 bit length should be enough as a comparison. Unfortunately I couldn't...
Let $G$ be a secure PRG and let $s$ be a private key. We can define $\mathrm{Enc}(s,m) = G(s)\oplus m$. As long as we know only one encrypted message this scheme is secure, since $G(s)\oplus m \sim r\oplus m \sim r$, where $r$ is a random string. I have several questions: If we know two encrypted messages $G(s)\oplus ...
I'm trying to write a C++ program to solve the shortest vector problem. The program is given a basis of a vector space V and needs to find the shortest non-zero vector in V. Right now I'm using the Ajtai-Kumar-Sivakumar (AKS) algorithm described here on slides 12 and 34. The problem is the time/memory complexity: for a...
in this paper https://eprint.iacr.org/2015/399.pdf how to make the lattice?
Consider the definition of the dual lattice for a lattice $\mathcal{L}(\mathbf{B}_{m\times n})\in\mathbb{R}^{m}$ where $\mathbf{B}\in\mathbb{R}^{m\times n}$ and $n\leq m$ [sp2 Seminar, Luxembourg 2019, DualitySlides, page 5]: $$ \mathcal{L}^{\vee}=\{\vec{v}\in span_{\mathbb{R}}(\mathcal{L}(\mathbf{B})): \langle\vec{v},...
I'm currently testing the randomness of using SHA-256 in Hash_DRBG mechanism based on this research. The parameters used in the testing are the default parameters, except for when the PRNG fails a certain test, the p-sample is doubled in a subsequent test. The result is as follows. Test n-tuple p-samples p-value As...
Suppose that $(\mathrm{Gen},\mathrm{Dec},\mathrm{Enc})$ is a semantically secure public-key encryption scheme. I define $E' = (E(e,m)\oplus m)\parallel (E(e,m)\oplus e)$. Clearly, this is now not secure, since knowing $e$ allows to know $E(e,m)$ (applying XOR with $e$ to the second half) and, consequently, leaks $m$. N...
There is an algorithm called EIG (Extra Information Gathering) protocol for Byzantine agreement of a bit over $n$ parties. The protocol has $t+1$ rounds. Can anyone help me understand how the time complexity of the algorithm is $\mathcal{O}(n^{t+1})$?
I'm working on an idea for a backend data store that stores encrypted data that is zero knowledge/trust, however is shareable to a number of parties. I don't want the backend service to know anything about the data or manage keys, so if the data was ever compromised then it would be meaningless to an attacker. Theref...
I want to concretely understand how exactly choice of error distribution effect the security of KEM in the context of Lattice Based Cryptography. For example, I would like to know the concrete analysis of CBD used in Kyber. How Kyber justiify the use of CBD from the security point of view. Could someone please suggest...
I am using a cryptography system in which the Feistel structure and permutation cipher are combined. I am amazed by the result; decryption is so much faster than encryption. My system is working properly. Anyone can explain why this is happening. Why is decryption faster than encryption?
When I learned about the inner workings of the TLS protocol and what exactly it protects a connection against, I was surprised to learn that even asymmetric encryption can be defeated by a MITM attack - as all the attacker has to do is replace the certificate with their own. This is why CAs exist, as a form of authenti...
For context, I want to see how far I can go using YouTube as a (bad) cloud storage solution just because of sheer curiosity and kicks and giggles. In said journey, I came across the problem of properly encrypting the files I upload to YouTube. In a perfect world, I would like to allow for file sharing as close as I can...
In Pass's lecture notes 2.13 section, a universal OWF is constructed. But I have some confusion about: Let $M_g$ be the smallest machine which computes function $g$. Since $M_g$ is a uniform algorithm it has some constant description size $|M_g|$. Thus, on a random n-bit input $y = <M, x>$, the probability that machin...
In AES Key Wrap, we apply 6n AES encryptions for an input of n 64-bit blocks. Informally speaking, we wrap the key 6 times. What is the motivation behind 6? Why not 4 or 10? Is there something like a treshold or trade-off coming from security vs efficiency concerns?
Generally, in cryptography, the security of a scheme/protocol $\Pi$ relying on a hard problem $P$ is demonstrated by constructing a reduction $\mathcal{B}$ that takes as input an instance of the problem $P$ and then interacts in a black-box manner with an adversary $\mathcal{A}$ that can "break" the security of $\Pi$ t...
Let $f(x)\in\mathbb{Z}[x]$, let $N$ be an integer with known factorization into prime elements. I want to know why it is easy to solve efficiently the equation $f(x)=0\ mod\ N$.???
I want to encrypt numeric identifiers into ciphertexts that are deterministic and not too long. I am considering AES-128 in ECB mode to encrypt 64-bit integers. How should I pad the 64-bit integers, and specifically, how should I verify the padding? When encrypting, I could encrypt a block where the first 64 bits are s...
RSA signatures are implemented by encrypting the padded hash with the private key. Why not take the approach RSA-KEM is using by removing the padding entirely and replacing the hash with a XOF that would produce the m value in range [1, n-1]. XOF is just a hash with arbitrary output length. Why hasn't it been done this...
Let's suppose that $(G,D,E)$ is a secure encryption scheme, that is, for any polynomial $p(n)$ and any sequence of messages $\{a_{n}\},\;\{b_{n}\}$ of length $p(n)$ $E(k,a_{n})$ and $E(k,b_{n})$ are computationally indistinguishable. Is $E'(k,m) = E(k,m)\oplus m$ also a secure "encryption algorithm"? Sure, in some case...
Since Linux 5.18, the internal state of the ChaCha-based CSPRNG is a 256 bits (32 bytes) BLAKE2s hash. There is also a fast key erasure mechanism which reseeds the CSPRNG every minute (source). I know we can read as much random data from /dev/urandom but I didn't understand how "conceptually" we can get, for example, a...
Consider the problem of finding two keys K1 and K2, such that for two distinct plaintexts P1 and P2, AES-CMAC(K1, P1) = AES-CMAC(K2, P2). Is this problem any easier than brute-forcing? If so, how much easier? Edit: plaintexts P1 and P2 are inputs to the problem and therefore they are fixed. We need to find the keys giv...
This question covers how to convert a projective point $(X_E, Y_E, Z_E)$ on a twisted Edwards curve to a projective point $(X_M, Y_M, Z_M)$ on a Montgomery Curve. Using XZ coordinates, there is no inversion needed as $X_M, Z_M$ can be directly obtained. Is it also possible to convert inversion-free the other way around...
I am learning zero knowledge protocols, and studied the GMW protocol for 3-Coloring (https://www.wisdom.weizmann.ac.il/~oded/X/gmw1j.pdf). A similar proof is also presented in Oded Goldreich's Foundations of Cryptography textbook. In this proof, the zero-knowledgeness property uses the hiding property of commitments. A...
I'm working on a scenario where a safe has a lock code '42', and this code needs to be shared securely among four individuals. The goal is to set up a system where at least two out of these four individuals must combine their individual pieces of information to recover the original code and open the safe. However, no s...
I accidentally overwrote a whole LUKS1 header without any backup. Since I still have the password with which the header was created - is there any way that this information helps me to reduce the range of potential master keys? I realize that the mapping from password to key still involves some randomization, so this r...
I have three binary arrays each one representing the pixels of an image. For example, if the picture size is 100 pixels X 100 pixels. Then the binary array would be 100×100×8×3 bits. These files are encrypted using the same cypher generated using LFSR. What do we know about the LFSR? The polynomial is [1,0,0,1,0,0,0,0...
Older hash functions like SHA-256 and SHA-512 are vulnerable to the length extension attack, which is problematic in the context of a MAC. There are several ways to prevent this: Use a newer hash function/XOF. Use HMAC or suffix MAC or envelope MAC. Truncate the output. Length prepending. Zero prepending. Double hashi...
Many companies argue their gathering of private data with 'digitization' but I guess their real intention is most likely just gathering data. However I didn't came up with a simple idea without it. Use case: Digital ticket for an event or for transportation or similar. We have: a ticket Seller $S$, a ticket owner $O$ ...
A slight modification of El Gamal signature scheme would be to compute: $r = g^k$ for some random k (as usual) but $s$ as: $s = (hash(m) - x)k^{-1} \mod (p-1) $ (instead of $(hash(m)-xr)k^{-1} \mod p - 1$). The verification procedure would be to check: $g^{hash(m)} = g^x r^s \mod p$ I don't see what we are losing by do...
Ok sort of long post incoming. Will go slow to make it as clear as possible I'm trying to build a C library for Elliptic Curve Arithmetic. Since the idea is to learn from the process, I decided to support many different coordinate systems. So far, I've implemented the group arithmetic for Affine and Projective coordina...
Given AES-128 with a 128 bit key, but the key is chosen such that its only last 16/32/48 bit are random rest are 0, how can i exploit this to know the key being used, given i have access to oracle that gives cipher for any chosen plaintext. Brute force can be using all the key and checking cipher, can someone suggest a...
The Argon2 variable-length hash function uses BLAKE2b directly if the user requests an output less than or equal to 64 bytes in length. However, if the user requests an output longer than this, each BLAKE2b-512 hash is truncated to become BLAKE2b-512-256. From Wikipedia: // If the requested digestSize is 64-bytes or...
I first posted this question on StackOverflow but they told me it belongs here instead: https://stackoverflow.com/questions/77856486/in-symmetric-encryption-where-alice-and-bob-message-each-other-how-can-both-dec I am building a messaging app where one client can message another. There will be 2 clients - Alice and Bob...
Consider ed25519 signing (RFC 8032). There, the private key is a 32-byte random value, and for signature generation, the 32-byte private key is first hashed and then the secret scalar and nonce are derived from the hash. Now, in threshold ed25519 (RFC draft), the thresholdized private key is the scalar (and the nonce i...
ed25519 is defined over curve edwards25519 which has a large prime order subgroup and a small subgroup of order 8. During key generation, bit clamping is used to derive the private key scalar. In https://eprint.iacr.org/2020/823.pdf, Section 4.2.3, the authors describe the effect of clamping the lower order bits as fol...
Consider I have a secret $a \in Z_P^*$ and n public messages where $m_i=x_i -a \mod p-1$ and $x_i \in Z_p$ for i=1,2, ..., n. Given that $a$ and $x_i$ for $i=1,2, ..., n$ are secrets, can a PPT adversary get the value of $a$ or $x_i$? I have an impression that it is difficult because this problem would be similar to s...
Ronald Rivest designed MD2, MD4, MD5, and MD6, but what about MD3? Was it skipped? Or perhaps kept private and never publicly released? (edit: found a related question)
I'm learning about encryption $(E)$ and decryption $(D)$ algorithms and am wondering what the following notation means, specifically the cartesian product for $E$ and $D$. $k$ represents key, $P$ represents plaintext, $*$ represents some length $$k ∈ \{0,1\}^l$$ $$P ∈ \{0,1\}^m$$ $$E: \{0,1\}^l × \{0,1\}^m → \{0,1\}^...
ECDSA can be instantiated with a variety of different elliptic curve groups. Two example curves are secp256k1 and edwards25519. Question: Assume we have a secret key scalar generated for secp256k1. Is it OK to use this scalar for ECDSA over edwards25519?
In the MPC protocol based on the common reference string (CRS) model, the CRS can be generated by the simulator, and the simulator can obtain the backdoor information in the CRS (such as the private key $sk$ corresponding to the public key $pk$), thus simulating correctly. One measure I can take if I want to build a p...
Say there are 5 parties. 1 is the sender, and 4 are the receivers. The sender has a unique shared key with each receiver. k1 - between sender and receiver1 k2 - between sender and receiver2 k3 - between sender and receiver3 k4 - between sender and receiver4 Sender wants to send a encrypted message Em to all 4 of these ...
I'm having trouble with solving the following question: Given two distinct prime numbers $p, q$ where $(p-1)$ and $(q-1)$ are not divisible by $3$, define $n=pq$. For how many elements in $\mathbb Z^*_n$ $\exists b$ for which: $b^3\equiv a\ (mod\ n)$ Given the fact that $|\mathbb Z^*_n| = \phi(n)=(p-1)(q-1)$, I could...
I was wondering if someone could explain the Digit Extraction from HElib in simple words: Apply a homomorphic (non-linear) digit-extraction procedure, computing $r$ ciphertexts that contain the digits $e − e′ + r − 1$ through $e − e′$ of the integers in the slots, respectively, relative to plaintext space mod-$p^r$. T...
To achieve approximately 128 bits of security, curve BLS12-381 uses 381 bits to encode the X coordinate. This means the size of a group element needs at least 48B to store/transmit. I am in a situation of trying to transmit a $G_1$ element in the IP packet level, where size is very critical, and 48B is somehow too larg...
Exploring LWE Lattice crypto. Generate system matrix and secret key from cryptographic PRNG (Fortuna). Derive public key as |p> = A|s>, then add NBits of zero mean uniform noise to the public key elements, producing |p'>. Publish (|p'>, A). System matrix, A, has been defined with NRows = 128, matching a 128-bit element...
I am really curious about this one problem 10.12 from Katz/Lindell's book. It goes as follows: I am quite sure we can assume that $\textsf{Enc}_k(m) \in \mathbb{G}$, as the authors devoted the whole subsection to this issue (p.367). Now, my best shot was to use this $\textsf{Enc}_k(m)$ kind of like an exponent $r$, so...
I'm wondering if the following scheme (or something similar) can exist: I want to encrypt a randomly generate a public key and secret key pair, $(pk, sk)$. I would like that $sk$ is encrypted some form of timelock encryption. My goals are: Nobody should be able to compute $sk$ before the timelock expires Anyone should...
I am working on a project where I need to authenticate data in parallel with computations on that data. The idea is to stream data from memory onto the chip only once; while the data is on-chip, we do a computation on it and authenticate. My current workstation uses ARMv8 instruction set (although I could change to an ...
Context To learn about fully homomorphic encryption (FHE) and a new language I implemented the Paillier cryptosystem in Go, and I thought it would be fun to apply it to the following interaction: A customer wants to find the closest shop near its zipcode (2345), and submits it to a website, that computes what the clos...
The instruction wants them the ciphertext to be the same size as the original message. The original message is "alicexoxox:bobko0oo0l:popo" I am supposed to use openSSL cli to generate a key in hexadecimal which i did by running: "openssl rand -hex 32" i then applied the aes ecb command on this message by running: <ech...
Decrypting an AES-Encrypted Message Without the Key: A Cryptographic Challenge Summary: I am investigating the possibility of decrypting an AES-encrypted message when the encryption key is unknown and unguessable. My query is aimed at understanding the limitations and potential of current cryptographic methods in such...
I was reading "serious Cryptography" by Jean-Philippe Aumasson,and when coming to Feedback Shift Registers,I didn't understand what role Polynomials play in the feedback function, does it have to do with polynomial addition,which is simuar to XOR? Also i made a simple FSR,just to understand it better,so I wanted to ask...
I read that in elliptical curve cryptography, the order of the Montgomery Curve is a multiple of 8, this mean that we can't have cofactor one curves which can be problematic in some corner cases because always has a cofactor bigger than 1. When the cofactor is not 1, it means that the subgroup of prime order is only a ...
I have an arbitrary array $X = (x_1, x_2, \dots, x_n)$ of disjoint integers. I want to determine whether there exists a prime number, $p$, and a value $y < p$ such that the sequence $$Y = \left(y_1, y_2, \dots, y_n\right), \quad y_i \equiv x_i y \pmod p$$ forms a superincreasing sequence. Furthermore, how can I find th...
I'm asking if this encryption scheme would increase the security of the user's data. Here's how it would work: The user would create an account (username + password). An encryption key (symmetric) is created for the user, which is then encrypted with the user's password and stored into the site's database. The encrypt...
Assume we have two uniform distributions $X=U(\mathbb{Z}_m)$ and $Y=U(\mathbb{Z}_n) \bmod m$, for $m,n \in \mathbb{N}$. The statistical distance is defined as: $$ \Delta(X, Y) = \frac{1}{2} \sum_{a \in \mathbb{Z}_m} | \Pr[X = a] - \Pr[Y = a] | \enspace. $$ Question: What is the statistical distance between $X$ and $Y$ ...
Trying to upsolve "notsosmart - hxp CTF 2017" https://2017.ctf.link/internal/challenge/5c8119ca-bfed-444a-968d-1cc9bff27bfb.html This server code was given during the CTF, letting you get multiple values of n: #!/usr/bin/env python3 from random import randrange from gmpy2 import * from fast import random_prime p, q =...
Given plaintext $m$ of length $l_m = |m| > 0$ After encryption $E$ $$E(m) = c$$ we receive a cipher $c$ with an elongated length $l_c = |c| > |m|$ With decryption $D$ $$D(c) = D(E(m)) = m$$ we receive $m$ again. The opposite does not to be always true: $$E(D(m)) = m' \text{ } \text{ with } \text{ } m' \in \\{m,m'',m'...
Here is an attempt at a Python implementation of what is described in the paper I attached as an image. The algorithm is too slow or there is something wrong with the code. Any ideas! import random def left_rotate(x: int, n: int) -> int: """ Circularly shift an integer 'x' left by 'n' positions. :return: A...
I'm learning various cryptography protocols and use cases and since I'm developing a USB device and PC application, it would be nice to use encrypted communication. I studied TLS 1.2 key exchange but mostly focuses on the one-way authentication only (client authenticates server), althought mTLS exists too. Aim is to: ...
In my understanding, the main difference in the proof between UC and standalone model is the ability to "rewind", which appears to related to malicious security only. So if we are only interested in semi-honest security models, do we have to distinguish UC and standalone models?
For SHAKE128 NIST has provided test vectors for Monte Carlo: [Minimum Output Length (bits) = 128] [Maximum Output Length (bits) = 1120] Msg = c8b310cb97efa3855434998fa81c7674 COUNT = 0 Outputlen = 264 Output = fe8c476993b47b10c98303a04c6212dfb341426d748d3926140aee0a151fc80fa1 How they are they calculating outputlen fo...
I have a question regarding the scheme below. PSI using homomorphic encryption appears to subtract the plaintext into the ciphertext. I understand that homomorphism is maintained in operations between ciphertexts. Is homomorphism maintained even if calculated as below? If 3. (b) operation is correct, c=[c0,c1] and x i...
I am working on a tool that uses password derived keys for AES and a selectable modes of operation to encrypt (and later decrypt) text for storage on an insecure media. The tool is constrained to using only the functions provided by the browser SubtleCrypto API, which are described as "low-level cryptographic primitive...
Is there some source of standard, vetted, efficient Montgomery elliptic curves over prime field? I'm looking for curves $B\,y^2\equiv x^3+A\,x^2+x\pmod p$ engineered for efficient computation of scalar multiplication with $X/Z$ coordinates and Montgomery ladder, which if I'm not mistaken is faster with small* $A_{24}=(...
I try to create a valid decryption function for a modified the Goldwasser-Micali scheme $pk = (N,p,q)$ where N is a Blum-Number $(p = q = 3 \bmod 4)$ $Enc_{pk}(m) = (-1)^{m} \cdot r^{2} \bmod N \text{ where } r \in_{R} \mathbb{Z}^{*}_{N}$ Now when I want to decrypt a ciphertext I can check if $m = 0$ by checking if ...
I've read the series of blog posts explaining TFHE scheme on zama.ai's website (four parts), and some things are not clear to me. I would appreciate if someone can shed some light on those topics. I am not sure I understand how multiplication by a "big" constant works in practice: what are the typical values for beta ...
I'm sorry if the answer to this is actually simpler than it seems to me. I'm running AES-GCM to encrypt some data keys, but I don't actually know how to go about calculating the probability of collisions for my setup, or how to derive the maximum number of plaintexts I can encrypt without violating NIST standards on ke...
In exploring post-quantum cryptography algorithms like Kyber and Falcon, I've come across their utilization of Discrete Fourier Transform (DFT) and Number Theoretic Transform (NTT), but I'm seeking clarity on why the choice of transform matters. While Falcon employs DFT in its algorithm and NTT in the verification phas...
As a hobby I built a radioactive decay based RNG, that I am still perfecting. I would like to know how to use its output to contribute to VC entropy pool for key generation. I know that before considering my device secure, there are many steps to accomplish. For now it is just a hobby project. I found the command --ran...
I have been going through some old lecture notes of mine and found this interesting question. Assuming we reduce the challenge space for the verifier from $\mathbb ℤ_q$ to $\mathbb ℤ_{\log()}$, does security still hold for Schnorr's verifier? My thought process so far is that it does. While the probability of guessing ...
In the case of an Elliptic curve over a GF(p) which has order n and multiplicative group of n-1 elements, does multiplication of an element of a subgroup of order q where q is a divisor of n-1 with a scalar s obey the cyclic property, or plainly put does an element e member of subgroup q when multiplied with s stay in ...
I am designing a one time password system, in which I will send the password to the user over some transport (concretely SMS). Once they receive it they will type it into the mobile app. In this way we can verify that the user has access the phone number they gave us. I want to use a stateless time based one time passw...
The way I understand this question is that we have a secure PRG G: $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l}$, and we want to use it to make a secure PRG G' : $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l'}$ which is essentially $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l + k}$ where $k$ is $l' - l$....
I have an interesting cipher based on matrix products that I've not seen before. Given plaintext bytes $p\in[0,255]$, pad to a perfect square length and write into the entries of an $n\times n$ matrix $\mathbf{P}$. Given a key $k$, apply some key derivation function $f$ to it to produce another $n\times n$ matrix $\mat...
looking at the linux kernel provided cipher and block cipher modes cat /proc/crypto my prefered mode CTR (counter/integer) is not provided. However the "crazy unsafe" ECB mode - in which "all equal plaintext blocks result in equal ciphertext" - exists almost everywhere. My question is: Can I emultate CTR mode by ECB-mo...
The following problem of my is from final exam for my online course last year; I couldn't have the time to do it, so I want to check whether my answer is correct; Q5) Given an (entirely) random hash function $h : S \times \mathbb{N} \to [p]$, where $p$ is the number of blocks in the hash table of size $p = 2q$, we requ...
My friend in the software industry came to me with one of his "dumb boss" war stories. This particular time, his (non-technical but eager to learn) manager came to him and told him to, in the new app he was developing, not store SHA2(password + salt), but SHA2(password) + SHA3(password) (both 256-bit). The boss claims ...
I am looking from 3 functions $f,g,h$ from $\mathbb N \to \mathbb N$ (they can be bijections, they need to be injective at least), such that: $$f \circ h \circ g = h $$ and $f$ is hard to reverse programmatically, and $h$ is hard to reverse programmatically. $g$ and $h$ cannot be keyed functions as they will be public...
According to the SDH assumption, it is hard for an adversary to output a pair $(c,g_1^{\frac{1}{c+\alpha}})$ given a $q+2$ tuple ($g_1$,$g_2$,$g_2^{\alpha}$, ...,$g_2^{{\alpha}^q}$) Now, consider $g_1$,$g_2$,$g_2^{\alpha}$, $c_1$, and $c_2$ is given to an adversary: 1- How is it hard to calculate $g_1^{\frac{1}{c_1+\al...
When creating a SealedBox, one of the parameters which needs to be passed is an authentication tag: https://developer.apple.com/documentation/cryptokit/aes/gcm/sealedbox/init(nonce:ciphertext:tag:) I have 2 questions about this: What should this authentication tag be? I have seen quite a few examples online where they...
We suppose that we have N consecutive numbers generated by JavaScript using: math.floor(math.random()*multiple), knowing that math.random() generates consecutive xorshift128+ values. I found that there exist a script capable of reversing this using Z3 (https://github.com/d0nutptr/v8_rand_buster) and it works perfectly ...
Have security assumptions based on quantum computers de facto constrained the emergence and application of many new cryptographic schemes (e.g., fully homomorphic encryption)? It seems to me that, in addition, too many resources are spent on so-called quantum-resistant cryptography schemes. Even though there is curren...