instruction
stringlengths
32
27.2k
this is a followup of the post I made there: https://stackoverflow.com/questions/77428690/merging-structured-encrypted-data Essentialy, I'd like to know if there is a way to merge bencoded data (or otherwise structured data), encrypted. i.e. you have something like this { "comment": "Big Buck Bunny, Sunflower versio...
I have this problem where I need to guess if bob wrote "yes" or "no" It is using AES-128-CBC and it tells me the next IV to be used. it takes input as a hex string and does the encryption for me I thought I completely understood this problem but I am not getting matching ciphertexts. My thought process is myGuess XOR ...
I'm new to cryptography, sorry if this question is dumb. I've just read the paper of Dwork and Naor Pricing via Processing or Combatting Junk Mail and understand the example of squaring on $\mathbb{Z}/p\mathbb{Z}$. Now I'm wondering how to apply the proof of work for a different kind of data, for example, I want to che...
Post-Compromise Security and Backward Security seem to mean that the attacker has obtained the communication key between two parties or groups in the current state, but cannot further obtain subsequent keys. What is the specific difference between them?
Recently, I was reading about Blake2B and its properties regarding randomness and security, and its connection to Daniel Bernstein's CHA CHA digest. As a budding cryptographer, I find it doable to implement those algorithms, but I find it very hard to grasp why the specific functions were chosen. From wikipedia, this i...
I'm comparing the Wikipedia description of SRP to the BouncyCastle implementation and some differences and I want to be sure the BouncyCastle implementation is suitable for my purpose. Wikipedia article: https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol The article has a a description of how M1 and M2 are c...
We know that a trapdoor function $f()$ is easy to compute in its original direction $y=f(x)$ while finding its inverse $x=f^{-1}(y)$ requires a secret information: without that trapdoor inverting $f()$ is hard: let's say it requires applying $f()$ to many preimages $x$ until the required image $y$ is found, so it's som...
If a system provide n bits of security, it is known that the best possible attack against the system would be 2^n (security parameter). However, why are the key sizes of some cryptosystems much larger than their security parameters? Is it because these cryptosystems have a weak and vulnerable algorithm?
In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or articles has generated public keys from these 2 conditions : 1 < e < phi(n) e < m So is it possible that we can choose...
If $\Pi=(\mathrm{Gen},\mathrm{Enc},\mathrm{Dec})$ is a CPA secure public key encryption protocol, is the following public key encryption CPA secure? $\Pi'$: $\mathrm{Gen'}$: Run $\mathrm{Gen}$ twice to get keys $\langle pk_1,sk_1\rangle$ and $\langle pk_2,sk_2\rangle$. $\mathrm{Enc'}$: Take $pk=\langle pk_1,pk_2\rangl...
I found this recent paper The Wiener Attack on RSA Revisited: A Quest for the Exact Bound, which reported a new bound $d\le \frac 1 {\sqrt[4]{18}} N^\frac 1 4$. Is this well accepted in the cryptanalysis research community? With a Python script, I personally verified the d revealed from the given (N,e) in Section 4 (pa...
I'm using Pedersen commitments to maintain the account balance in the ledger. Assume that when I create the account, I record the Pedersen commitment of 0 in a ledger (here, the blinding factor and generators are also recorded in a ledger). First, I minted some tokens, let's say 10 tokens. Now I retrieve Pedersen's c...
By SHAKE256_256, I mean taking first 256 bits of the output of SHAKE256 i.e. SHAKE256_256(M) = SHAKE256(M,256) What is the motivation of choosing SHAKE256_256 instead of SHA3-256 in XMSS and SPHINCS. Are there any advantages of SHAKE256_256 over SHA3-256. As far as I know, they both have 24 rounds keccak with instant...
Can we define an RSA variant in which the public key with $n$-bit public modulus $N$ has a compact representation of $\kappa\ll n/2$ bits, with a security argument that it is as safe as regular RSA for a given $n$ (e.g. $n=2048$), and the constraint that the two prime factors $p$ and $q$ of $N$ have (about) equal bit s...
In Hybrid key exchange in TLS 1.3, they mention that with a hybrid approach, we concatenate the shared secret from each method (say KEM like Kyber768 + classical ECDH X25519 = X22519Kyer768). concatenated_shared_secret = shared_secret_1 || shared_secret_2 The idea for the hybrid is that it is quantum safe to prot...
SPHINCS+ is an interesting post-quantum algorithm, and I'm curious about what its limitations are. What I know about hash-based signature formats in the past are that you needed to remember which signing key branches have been "used"--statefulness--and that the tree could only be used for a certain number of signature...
I was thinking about how SRP might be used with Curve25519 or Curve448. In this question, Can SRP be used with Elliptic Curves?, the answer is that you can't directly translate SRP to a group that isn't also a ring, because SRP uses not just multiplication but also addition. In traditional SRP-6a, the server computes ...
I have a scenario where $k_2 = -k_1$ while $z_1$ and $z_2$ are identical but the values $s_1$ and $s_2$ are different. So we have $r_1 = r_2$ and $z_1 = z_2$ but $s_1 \neq s_2$. Does this mean an attacker can recover my secret key or I am protected?
In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or articles has generated public keys from these 2 conditions : 1 < e < phi(n) e < m So is it possible that we can choose...
An efficient algorithm for factoring would be a major mathematical achievement giving the person who discovered it anstant fame. About two years ago, C. P. Schnorr claimed such a breakthrough but it turned out the approach did not work as well as he thought. The technical details of his approach were extensively discus...
Passkeys are being introduced. From what I understand so far, a passkey involves the storage of a private key, and retention of a public key with the internet service. Eg Google, Apple, Microsoft, Reddit, StackExchange, etc. Does the formation of a passkey, or the subsequent use of a passkey by itself alone, identity t...
Hashing functions are used for data integrity when integrated with signing asymmetric algorithms but I miss a step. In multiple sources like here or here I read for granted that hashing algorithm per se are enough for ensuring data integrity. Let's go into an example. We hash the content and send it alongside the origi...
For some common curve, can we exhibit three distinct ECDSA signatures $(r,s_1)$, $(r,s_2)$, $(r,s_3)$, a message $m$, and valid public key $Q$, such that the signatures verify? Can we also generate the private key $d$ matching $Q$? Can we do this for given $Q$ and matching $d$? For two signatures, that's trivial: $s_2...
I generated a Pedersen commitment for a given account balance (say, 10) and stored it in the ledger. Now, when I debit 15 tokens from the same account, I first retrieve the Pedersen commitment of 10 from the ledger and subtract it from the Pedersen commitment of 15, and then I want to check whether the resultant Peders...
I'm an amateur so bear with me. I was thinking about an E2E solution for data-at-rest proxy scenarios (like cloud storage provider) that allows you to issue and revoke users via symmetric keys. I'm thinking that Alice wants to communicate with Bob, via Eve. Without revealing the master key to Bob or Eve, this seems pre...
i have a pretty straightforward question but i can’t seem to find an answer : Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys generated in hardware “higher quality” than those generated in software? in the sense that in software, pseudorandom nu...
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...