instruction
stringlengths
32
27.2k
I was having a conversation with a private key cryptologist who claimed they created and distributed, in the early 1990s, all 32 bit primes on 1 640Mb CD-ROM, which could also used for immediate lookup of resulting prime factors, is that even possible, in early 1990s? They also claimed that design has been upgraded ove...
I wonder, is $\gcd(e,p−1)=1=\gcd(e,q−1)$ similar to $\gcd(e,\phi(n))=1$ ??
I have an elliptice curve in the form y² = x³ + ax + b (mod p) And I have a multiplication algortihm which uses only x and z coordinate How can I recover the Y coordinate ? I tried to use the curve equation, but because of sqrt_mod, there's 2 possibles solutions and I don't know which one to choose def xDBLADD(P, Q, ...
Here's the code: salt = b'salt123123123' password = 'password123' hash_password = argon2.PasswordHasher().hash(password.encode('UTF-8'), salt = salt) Returns $argon2id$v=19$m=65536,t=3,p=4$c2FsdDEyMzEyMzEyMw$GJrdl/EO1WTelvwalnJsSc/JcMsS0LGEVsIwcd/xSIU The salt here is c2FsdDEyMzEyMzEyMw, how can i get back the origin...
I made two Linux kernel modules of Hasty Pudding Cipher with key size of 16896-bits (16384-bits key + 512-bits tweak also called "spice), one has 512-bits of block size, the other 128-bits. I would like to use the 128-bits block size version with XTS in Linux, but I read an answer here in the forum saying that AES-256 ...
This paper says in the appendix, At a high-level, malicious privacy is defined similar to malicious security, but with a modified ideal functionality that is corruptible, meaning that the adversary can control what it outputs. So does malicious privacy refer to malicious security without ensuring correctness? Then is...
I'm trying to implement encrypted firmware update functionality for an embedded device. The goal is to prevent reverse engineering of our firmware when the update files are shared with our customers. The approach that I've chosen is to encrypt the firmware using AES-128 with CTR block mode. What I'm pondering right now...
This is from Justin Thaler's book - Proofs, Arguments & Zero Knowledge Page 43 For it to make sense to talk about multilinear extensions, we need to view the adjacency matrix $A$ not as a matrix, but rather as a function $f_A$ mapping $\lbrace0,1\rbrace^ {log n} \times \lbrace0,1\rbrace^ {log n}$ to $\lbrace0,1\rbrace...
I understand that the // operator is used for floor division in regular arithmetic result = 7 // 3 # This will result in 2 but how can I adapt this to work with the specific mathematical operations involved in secp256k1? Could someone provide guidance or a code snippet illustrating how to perform floor division on se...
Given two values $r'-r \mod q$ $i - r \mod q$ Where $r',r$ sampled randomly from $Z_q$ while i is pick arbitrarily from $Z_q$ and a secret Can we claim that this hides $i$? Here is my sketch: Distribution of above samples is indistinguishable to $r'' \mod q$ $i - r \mod q$ Where $r''$ is randomly picked from $Z_q...
So I think I understand how zero knowledge protocol with 3-coloring is supposed to work. But in an attempt to increase soundness of the protocol, we allow the verifier V to challenge two edges per repetition instead of one. I'm told that this breaks the zero knowledge property, but I'm not exactly sure how to prove it....
Let $X$ be a point on an elliptic curve such that $X = [x]G$, where $G$ is a generator. Let us assume that we know $x$ is something $x = 65t + 1$ where $t$ is an integer. Now if I know that the key exist somewhere between a given range $[A, B]$ then which algorithm would be best to apply to find the key $x$? Will it be...
Since the practical security of a symmetric-key primitive is determined by evaluating its resistance against an almost exhaustive list of known cryptanalytic techniques. My problem is that could we evaluate the minimum complexity of key recovery of a cipher from an information theory perspective when the success probab...
I'm working on a web app ("main") which acts as a central access hub for several other web apps ("children"). The users are supposed to authenticate in the main app, resulting in a $t_{main}$ token known to the client devices, and they are supposed to authenticate in each separate child app they want to access, resulti...
I'm looking for maximum possible security. My current scheme is xChaCha20-Poly1305-xSalsa20-Poly1305-AES-CBC-HMACSHA-512. Does combining these algorithms increase security if implemented correctly? Here's my source code for reference: private const int Iterations = 32; private const double MemorySize = 1024d * ...
Given a basis $\{v_1,\dots,v_k\}$ for a $q$-ary lattice $L$ in ${\mathbb Z}_q^n$, is there an efficient (deterministic/randomized) way to find a point in $L$ with all non-zero components, or decide that it does not exist?
I come from the question here: Safe primes subgroup in Diffie–Hellman key exchange Where the accepted answer states that there are only 4 possible outcomes for the order of a subgroup when using a safe prime in the Diffie-Hellman Key Exchange: (1, 2, q, p-1) where q is the Sophie Germaine prime (i.e. (p-1)/2) and p is ...
According to Section 2.3 of Full-RNS CKKS: More precisely, for a basis $ \left\{p_{0}, \ldots, p_{k-1}, q_{0}, \ldots, q_{\ell-1}\right\} $, let $ \mathcal{B}=\left\{p_{0}, \ldots, p_{k-1}\right\} $ and $ \mathcal{C}=\left\{q_{0}, \ldots, q_{\ell-1}\right\} $ be its subbases. Let us denote their products by $ P= \prod...
I saw a post named "How does signing with FORS work in SPHINCS+?" but in the post it seems like no one had explain how does the FORS works. SK: Secret Key, PRF: Pseudo-Random Function I'm know a bit how the key generation works. Just in case, I'll say what I know just to ensure it isn't misinterpret by me. Using a PRF ...
Naccache-Stern cryptosystem is mainly based on Chinese Remainder Theorem. According to its wiki page and Partially Homomorphic encryption book, I generated following keys. 1- Picked a family of k small distinct primes. I set k to 6 and primes are pi = {3, 5, 7, 11, 13, 17} 2- Divide the set in half and find the multip...
I've been reading up on different authentication protocols recently while I implemented the sign-in functionality for my website. Many of the suggested methods password-based authentication seem to either rely on non-quantum safe maths (eg. ECC, DH, SRP), or be really complex (eg. aPAKEs), or offer slightly reduced sec...
In the Kyber specification there is an algorithm "Parse", which receives a byte stream as input and from this the NTT representation $\hat{a} = \hat{a}_0+\hat{a}_1X + ... + \hat{a}_{n-1}X^{n-1} \in R_q$ is calculated from $a \in R_q$. For the sake of completeness, I have added the algorithm here: I have a few question...
I would like to deterministically derive two different 256-bit keys from a single passphrase -- one used as an ECDSA private key, the other as a symmetric key for AES-GCM. Would a KDF output sufficient bits of entropy, given a 256-bit input? I'm planning to use Argon2, but I'd be happy to use another KDF if necessary. ...
I am aware there are many techniques to reduce the error of lattice-based homomorphic encryption. But is there any technique to deal with lattice-based homomorphic commitment, e.g., More Efficient Commitments from Structured Lattice Assumptions TIA
im having a problem while solving a RSA problem, so i have python script to create a RSA key and cipher, from that i have n, invp, and invq. so my question is possible to decrypt the message only with n, invp, and invq. Here's the code from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_OAEP message = byt...
Motivation I have a use case that involves sending small (25-50 byte) encrypted messages over a very constrained channel. Many senders send public key encrypted messages to other receivers. Anonymity (eavesdropper can't tell which sender sent a message) is the reason for using asymmetric crypto. I'd like a cryptosystem...
I am designing a Hybrid Key exchange library using x25519 and Kyber, and the scheme I have in mind is as follows: Alice sending a file/message to Bob: Bob's Kyber public key + Random Data -> KEM => ciphertext, Kyber shared secret Bob's Ed25519 public key + Alice's Ed25519 Secret Key + Kyber ciphertext -> X25519 => x255...
Given a composite number $n=pq$ of primes $p$ and $q$, a secret random element $r$, and two public random elements $x_1$ and $x_2$. An adversary is given two elements, $y_1= x_1^r \mod n$ and $y_2=x_2^r \mod n$, and its goal is to correctly match $x_1$ with $y_1$ and $x_2$ with $y_2$, with probability $\frac{1}{2}+\eps...
Assume that the same message is encrypted using two different keys within the BGV encryption scheme. Can we assume that the resulting ciphertext are indistinguishable? I.e., given $c_1 = \text{Enc}(sk_1, m)$ and $c_2 = \text{Enc}(sk_2, m)$, are $c_1$ and $c_2$ indistinguishable? If so, is there any proof of this in the...
When taking AES for example, the number of rounds increases as the key size increases. This is done in order to adequately diffuse key bits into the state of the cipher. Suppose you replace the AES key schedule with SHAKE (SHA-3). Would such round expansion be necessary? Since every bit of the key would influence every...
‌Dear community, I have a technical question regarding the use of the addresses in section 4.2 of FIPS 205, the NIST standard of SPHINCS+. Taking for example the tree address, we want to copy an integer in big-endian byte type in the words 1,2 and 3 of the address (starting at 0). Hence, the lowest byte of my integer s...
I'm trying to understand the hardness of problems (e.g. in cryptography) from the point of view of complexity theory. For the complexity class NP, Wikipedia (11/2023) says NP is the set of decision problems solvable in polynomial time by a nondeterministic Turing machine. NP is the set of decision problems verifiable...
Can someone please explain the definition of differential privacy. Here is the one which I see and am unable to understand it: Its from this paper. I do not understand the use of $S$ here and also what does coin tosses of $\kappa$ mean here? Is it that the probability is over the choice of the randomized function $\ka...
I'm exploring the secp256k1 elliptic curve in the context of cryptography and encountered the concept of Point negation. I would appreciate clarification on what point negation means in this context. As I understand it, given a point $P = (x, y)$ on the secp256k1 curve, the negation of this point is represented by $-P ...
In the ElGamal cipher, the key generation algorithm needs to randomly sample a generator g and test whether g is a safe generator or not each time. I wonder whether we can use a fixed safe generator for all users, which may reduce the time of key generation. Will this be safe?
The BFV algorithm is one type of fully homomorphic encryption algorithms. How can I encode an integer to polynomial ring by using batch encoder based on $R_t := {Z_t[X] \over ⟨(X^n)+1⟩}$? The plaintext space $(R \bmod t)$ is $R_t := {R \over t \cdot R}$ for some integers $t$ and encryption of the element $m(X) \in R_t$...
In Kyber with $q=3329$, we end up with a field that das 256th roots of unity, when we apply the chinese remainder theorem (CRT) for such a field, it may look like, according to a post here: $$\mathbb{F}_{3329}[x]/(x^{256}+1)\cong\prod_{i=0}^{127}\mathbb{F}_{3329}[x]/(x^2-\zeta^{2i+1}),$$ My question is, why we can then...
I want to find a hash collision for Blake2 with 32 bit digest length such that i have 2 messages that produce an identical hash digest. How would you do that? is there another option than just bruteforce? I tried brute forcing but that doesn't seem to work out nicely since the hash space is already quite large with 32 ...
I have read so many papers and posts about lattice attacks on ECDSA but none of them used an example of different MSB values for k but instead they all used fixed MSB. So here i am trying to understand it better, I have 3 nonce (k1,k2 and k3) with their distinct MSB but i do not know how to place them into a matrix. He...
The encryption oracle only allows you to encrypt a custom message $m$ or the secret message $m_s$. In both cases it asks you to choose a public exponent $e>16$. Of course, $n$, is not available. If I had multiple queries, the first step should be to ask the oracle to encrypt two custom messages with the same exponent t...
In my previous understanding, if a RAM program requires $T$ read/write operations to memory during its execution, then the runtime of this RAM program is $T$. However, as I have read some literature, I have realized that my understanding may not be correct. For instance, there is a paper mentioning a $T$-time RAM progr...
As the director of a privacy-preserving startup venturing into Multi-Party Computation (MPC) protocol development, we are faced with the challenge of finding the most suitable business model. Our potential clients emphasize the requirement of not sharing their data outside their network. Subscription-based pricing seem...
Are the 64-byte curve secp256k1 ECDSA signatures distinguishable from random data? I.e. Given a random private key and random data, will there be patterns? Is there a proof or reasoning for this?
In the NTRU cryptosystem, we can use a randomly generated polynomial f that is inversible under modulo p and q to encrypt and decrypt our plaintext. While studying this system, I attempted to bruteforce the value of f given a fixed g and a known plaintext for small parameters, and found that N total values of f were ob...
I am trying to understand the encryption procedure in Craig Gentry's initial construction for FHE described in Fully Homomorphic Encryption Using Ideal Lattices. Unfortunately after repeated attempts I simply still find the paper too hard to read and digest. To my aid I have compared a pair of surveys on the topic, Mar...
I'm relatively new to this topic, and I have a question that might seem basic. I appreciate your patience. In most PSI schemes(2 party or multi party),the intersection result is always output by only one of the parties.If this party modify the final result,the scheme is obviously unsafe.I guess there is some assumption...
I am stuck at a homework problem to find the square root of a quadratic residue $b$ in $Z_n$ ($n$ is not a prime). Currently, I have figured out that there exists a number $a \in Z_n$ such that $a^2 \equiv 1$. If I understand the theory correctly, that means the order of $QR_n$ is a multiple of $2$. Since $QR_n$ is a s...
I wish to do arithmetic on elements in an integer subring of a cyclotomic number field, i.e, in $\mathcal{O}_K = \mathbb{Z}(\zeta) \cong \mathbb{Z}[X] / <\phi_m(x)>$ where $\zeta$ is a root of the m'th cyclotomic polynomial $\phi_m(x)$ . As example, take $\zeta_8$ an 8th root of unity and the ring $\mathbb{Z}_p(\zeta_8...
Wikipedia says that, for an ideal cryptographic hash function, "the probability of a particular n-bit output result [...] for a random input string [...] is $2^{-n}$ (as for any good hash), so the hash value can be used as a representative of the message". I'm looking for the name of this property. People often mentio...
In particular, AES-CBC with Blake2b for HMAC combined with xChacha20-Poly1305. The scheme is to encrypt with xChacha20-poly1305 first, using a key derived from a high entropy password using argon2id then with AES-CBC-Blake2b with a new key derived from the master key using argon2id and random IV encrypt the result of t...
I have found a cipher text that shows up as a Nihilist Cipher when entered into the dCode cipher identifier. The text was found in a torn slip of paper bearing the words TAMAM SHUD, the last two words in the Rubaiyat of Omar Khayyam. I have been able to photograph the cipher text but I am not in any way a skilled perso...
I am trying to understand the RSASSA-PSS and process of generating keys with rsassaPss. I am using below openssl command to generate private key: openssl genpkey -algorithm rsa-pss \ -pkeyopt rsa_keygen_bits:2048 \ -pkeyopt rsa_pss_keygen_md:sha256 \ -pkeyopt rsa_pss_keygen_mgf1_md:...
While examining the initial GCM specification by McGrew and Viega in 2005, it appears that the formation of the 128-bit Initialization Vector by combining a 96-bit nonce and a 32-bit unsigned wrapping counter seems somewhat random. This choice results in a repetition of the scrambling pattern every 2^32 16-byte blocks....
Specifically, I want an algebra group $G$ (or ring $R$) features: Given elements $g,h\in G$ (or $R$ ), computing $g\cdot h \in G$ (or $R$ ) is easy. Given an element $g \in G$ (or $R$ ), finding the inverse of $g$ is hard. Given an element $g \in G$ (or $R$ ) and a trapdoor $\tau$, finding the inverse of $g$ is easy,...
i'm trying to learn how commercial (for example PaloAlto or Fortigate) middleboxes intercept and decrypt TLS 1.3 traffic. To do that I started observing the TLS traffic between the client, middlebox and the server. Now I drew my conclusions out of this and I would like to verify if that is correct. Maybe you could give...
Since code-based PKEs work by correcting error introduced into the ciphertext, and since truncating ciphertext constitutes both saving in bandwidth and introducing "errors", my question being: can we achieve the combined goal by using truncating? is there any scheme that does that? if not why?
Hello sorry if this is a silly question and do say if this would be more suitable for a software stack-exchange but after a lot of googling I've still not found anything suitable, so starting to worry that there might be problems with this design? I am looking to encrypt some data in a database so the data is safe if a...
Trying to solve problem with verifying a message through the ElGamal signature scheme and I end up getting two different values. I'm given a prime number p=881 , e1=3, d=60 , and a random value r=11 . I have to a) Find e2 and the signature of the message M=300 . b) Verify the signature. I'm stuck on part b verifying V1...
A common family of requirements for (cryptographic) keyed hash functions is that the function $h(k,-)$ should have good collision resistance for all keys $k$, even if the key $k$ is known to the attacker. I'm looking for something with slightly weaker security properties to this, but which is unusually fast. Specifical...
I have a protocol where I have a random one-time number message $m \in \mathbb{Z}_p$, where $p$ is a 256 bit prime from an Elliptic Curve (EDIT: The order of an elliptic curve prime order group). I also have a textbook RSA ciphertext $m^e \mod n$, encrypted using a 2048 bit RSA key. I am using for its homomorphic pr...
I'm working on a program that requires multiple key pairs from multiple algorithms to be derived from a single 128-byte master seed. However, I couldn't find an implementation for Falcon512 that allows generating key pairs directly from the seed. Would it be safe if I passed the master seed through an XOF and extended ...
I am a beginner in the cryptographic field but as a graduation project, I have to build an identity verification and management system using zero-knowledge proofs. I see a lot of zkp techniques, algorithms, and libraries. I got lost and concerned about its implementation complexity. so, my question is, what are the rec...
Because of implementation constrains, I merge some 4-bit S-boxes to find a 8-bit S-box with good properties such as nonlinearity, resistance against differential and linear cryptanalysis. Does the analysis of the larger S-box give us the assurance that we have acceptable security, or we have to check the details of th...
1- Can someone explain why we have the definition of dual of a lattice like $\Lambda^*=\{\vec{v}\in span(\textbf{B}): \langle \vec{v},\vec{x} \rangle \in \mathbb{Z}, \forall \vec{x} \in \Lambda\} $. 2- There is an explanation in the lecture note of Daniele Micciancio, (CSE206A) Spring 2007, here, but I cannot follow so...
Given a group generator $g$ (in a group where DDH is hard). Let $X_1=g^{x_1}$ and $X_2=g^{x_2}$ be two public elements, where $x_1$ and $x_2$ are selected randomly and kept secret. Consider a game where a challenger selects secretly some random $r$ and computes $Y_1= X_1^r$ and $Y_2=X_2^r$. The challenger hands $Y_1$ a...
Formula for calculating an ECDSA signature (r, s) is: s = k-1(z + qr) k - private key for a random point R z - hash of a message q - original private key r - x(R) I am interested in why do we need two secret values (k and q) in a formula for calculating ECDSA signature? In other words, why we need one additional secr...
I've found the following encryption scheme UserA: $$sk_A, pk_A = sk_A \cdot G$$ UserB: $$sk_B, pk_B = sk_B \cdot G$$ Enc: UserA $$u \in \mathbb{Z}_q^* \\ Y = u \cdot pk_B \\ S = H(U) \oplus m \\ C = (S, Y)$$ Dec: UserB $$Y \cdot sk_B^{-1} = u \cdot pk_B \cdot sk_B^{-1} = u \cdot sk_B \cdot G \cdot sk_B^{-1} = u \cdot G...
My project is to build a true random number generator that relies on the avalanche effect in a Zener diode. This for a messaging device that uses one-time-pad encryption. Reading about similar projects, I assume to get fairly high entropy right from the raw stream. Next stage is to condition the bit stream in software ...
Given an objective function, we can give many programming implementations based on existing computers. Can we prove that the algorithm given is time optimal? For example, if we give a recursive solver for the NTH term of the Fibonacci sequence, how can we prove that the recursive solver is not optimal (by a general met...
Cracking an ideal block cipher is basically a brute force key enumeration. The complexity of the attack is exponential, growing as $2^b$. Cracking ECC is also exponential, but the cost grows as $2^{\frac{b}{2}}$ where $b$ is the public-key size (with a compact representation). I ask whether there is a class of asymmetr...
In "On Defining Proofs of Knowledge" by Mihir Bellare and Oded Goldreich, the definition of knowledge soundness (KS) is (See Definition 3.1): Validity (with error $\kappa$): Let $p(x)>\kappa(x)$ be the verifier accept probability. The expected number of steps of extractor bounded by: $$T1=\frac{|x|^c}{p(x)-\kappa(x)}$...
If various PKC is shown to be not NP=Hard, what happens to crypto? More importantly, what happens to crypto wallets? If it is shown that P=NP for many currently assumed to be hard problems, but finding the easy solution is itself hard, does the original problem remain NP=Hard?
I'm mulling over the need for a proof of reputation performed on a subject. When a guy starts to build a future he has to start here from scratch, his previous reputation does not matter, but it is not true, there is a lot of value in his contributions on GitHub, opinions on the previous Twitter or followers on LinkedI...
from Crypto.Util.number import * from flag import flag def gen_prime(nbit): while True: p = 0 for i in range(nbit, nbit>>1, -1): p += getRandomRange(0, 2) * 2 ** i p += getRandomNBitInteger(nbit>>3) if isPrime(p): return p nbit = 512 p, q, r = [gen_prime(nbi...
In the paper "Hybrid Key Encapsulation Mechanisms and Authenticated Key Exchange" by Bindel et al., I looked at the IND-CCA security experiment (figure 3). In the first line of the game, we have $H \leftarrow \mathcal{H}_{\mathcal{K}}$ However, I cannot find the definition of $\mathcal{H}_{\mathcal{K}}$ in the paper....
Let us take example of secp256k1 curve. The current known public key with most leading zero (in x cordinate) is: pubKey = (0x00000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63, 0x3f3979bf72ae8202983dc989aec7f2ff2ed91bdd69ce02fc0700ca100e59ddf3) private = 0x7fffffffffffffffffffffffffffffff5d576e7...
Do Safe and Sophie Germain primes maintain a relatively stable distribution as numbers get larger, or do they become rarified beyond a predictable value? This is important in one area of triangular number comparison for some of my study. What is the predicatable, stable distribution? Is there a comparable density, like...
I saw posts tangentially related to this, but not this one specifically. I'm building a content-addressable storage layer where I'd like to store the contents encrypted. The question is what is a safe 'content address'/lookup identifier that would not weaken the encryption. In an unencrypted store, I would have some da...
If i understand correctly, hashes run a defined set of operations iteratively until the original data is all hashed. Can you take a hash value, run it backward through the last step (or once, for an approprately sized starting block), and get a pool of possible starting states? If you run that pool of states through th...
Accidentally used ed25519 public key to create libsoidum_sealed_box. Is there any way to decrypt the data if the private key ed25519 is known?
I'm exploring elliptic curve cryptography, specifically on the secp256k1 curve. I've come across the concept of point division by integers using scale multiplication, my question is how can I devide a point by $7$, Is there a standard method or cryptographic approach to achieve point division on secp256k1 for these non...
The basis for this question is a 1-dimensional NTRU cryptosystem. After some literature inspection I have found out it can be also generalised into higher algebras: quaternions (QTRU) and octonions (OTRU) while keeping the same logic of operations in a modular quotient ring. One may therefore encrypt multiple messages ...
Consider a floating point number $f$ in IEEE 754 format with sign, exponent and significand values as $f.s$, $f.e$, and $f.sig$. Given this floating point number $f$, I want to compute the shares of $f$, denoted as $f1$ and $f2$, such that $f=f_1{\underset{\mathsf{FP}}+}f_2$, where ${\underset{\mathsf{FP}}+}$ denotes t...
I want to find the minimum distance of an $[8,4]$ Near MDS code over a finite field F_4 (NMDS Code is a type of linear code). I want to know which programming language has a built-in function that will return the minimum distance (or the minimum weight) of this code.
let $F$ be a finite field, $E(F)$ an elliptic curve of order $n$, $r$ a factor of $n$, $k(r)$ for the embedding degree of $E(F)$ with respect to $r$. Then why the full $r$-torsion group contains $r^2$ many elements and consists of $r+1$ subgroups?
Participating entity: multiple data owners, computing clouds Protocol: The multiple data owners send their data to the computing clouds, which perform the computation of the data. Privacy protection: Using a public key based homomorphic encryption scheme, the multiple data owners encrypt their data before transmissi...
I am working on an experiment to compare the efficiency of brute-force attacking block ciphers like AES and DES with reduced key sizes for different programming languages and library implementations. However, I am restricting it to using a ciphertext only attack, so I will generate 1 block of random plaintext, encrypt ...
We have access to an encryption and decryption server with the following implementation. How can we get the secret key by interacting with this server? from Crypto.Cipher import AES KEY = ? def encrypt(plaintext): if len(plaintext)%16 != 0: return {"False"} cipher = AES.new(KEY, AES.MODE_CBC, KEY) ...
I am trying to implement the algorithm suggested in Section 5 of the Black & Rogaway paper titled "Ciphers with Arbitrary Finite Domains" in C++. It is a Feistel cipher that tries to encipher to a target "unusual" domain size $k$, using cycle-walking when necessary. This excerpt describes an example: In order to spec...
Consider a matrix $H \in GF(2)^{a \times b}$ where $b > a$. This defines two linear codes. First, we have the code for which $H$ is the parity check matrix: $$ C = \{ \mathbf{x} \in GF(2)^b | H \mathbf{x} = \mathbf{0} \}. $$ Secondly, we have the dual code, for which $H$ is the generator matrix: $$ C^\perp = \{ \mathbf...
I'm implementing Argon2id from the RFC 9106 and I'm at the part where each thread computes J_1 and J_2 in order to generate indices [l] and [z]. I'm confused as to which TYPE (y = 0, 1 or 2) of Argon2 to use when computing J_1 and J_2, because the RFC basically says: "If you're doing Argon2id, compute J_1 and J_2 as de...
Research paper: "Extended-Chacha20 Stream Cipher With Enhanced Quarter Round Function" The initial matrix is 6x6, but what are the exact inputs for each index, in other words, how will you fill the two additional columns that are added to the matrix? Is it possible to change the constant values? and is it based on a s...
I am researching ASCON. I can find cryptanalytic attacks ASCON authenticated encryption and ASCON HASH, But I am not finding anything ASCON MAC. Anyone knows of any attacks, any research on this?
I know that DES has 56 independent key bits, and that 3DES has 168 independent key bits by using 3 separate 56-bit DES keys. 3DES also has a block size of 64 bits. If I use 3DES as the underlying block cipher to construct a Davies-Meyer compression function, what would be the input/output size of this compression funct...
Normally, the chinese theorem looks like this:$$ x = a_1 \bmod n_1\\ x = a_2 \bmod n_2\\ x = a_3 \bmod n_3$$ but what to do if in my situation it looks like this:$$ c_1 = x^e \bmod n_1\\ c_2 = x^e \bmod n_2\\ c_3 = x^e \bmod n_3$$ I know $c_1$, $c_2$, $c_3$, $e$, $n_1$, $n_2$ and $n_3$. So how do I find $x$?
In GRR3,we make the first row of the Garbled table to be zero by choosing a special value of $C_1$. Why don't we make the second row also zero by choosing a special value of $C_0$?
Suppose $\Pi=(Gen,Sign,Vrfy)$ is a secure signature scheme, is the following signature scheme $\Pi'$ secure? $Gen'$: The same as $Gen$, output public-private key pair $pk,sk$ on input $1^n$ $Sign'$: On input a private key $sk$ and message $m\in\{0,1\}^n$, choose uniform $r\gets \{0,1\}^n$. Output $\sigma=(r,\sigma_0,\...
Montgomery Reduction requires that $gcd(R,N) = 1$, where N is the original modulus and R is the selected modulus which is like $2^k,k\in\mathbb{N}$, because the computer adopts binary coding. When N is odd, R and N must be prime, but when N is even, we cannot find the R in form $2^k,k\in\mathbb{N}$. The paper “Montgome...
Many blockchain users have wallets that hold a private key, which can interact with a website. For example, the website can request the wallet to sign a specific message. 'Do only sign this message if you trust the frontend and you want to give it access to your private key used for XYZ.' From the deterministic signatu...
Is it possible to change the constant values of ChaCha20? and how it will affect the security of the cipher.