instruction
stringlengths
32
27.2k
I have a doubt in my research work, can anyone tell me; What is the difference between $\bmod {p-1}$ and $\bmod p$
Let $F$ be a strong pseudo random permutation and define a fixed-length encryption scheme $(\operatorname{Enc,Dec})$ as follows: On input $m \in \{0,1\}^{\frac{n}{2}}$ and key $k\in \{0,1\}^{n}$, algorithm $\operatorname{Enc}$ chooses a uniform string $r \in \{0,1\}^{\frac{n}{2}}$ of length $r/2$ and computes $c:=\oper...
I have a couple of polynomials to find. Can anybody guide me with the steps to find the feedback polynomial using berlekamp massey's algorithm. Example: Key fragment: 10100100001001101001011 seed: 11010000101 The online tool gives me this answer: x^11 + x^2 + 1 whereas the correct answer is: x^10 + x^8 + 1 Thanks
Say hypothetically I want a service where users express their opinions. But those opinions are heavily dependent upon where they work, and the best way to prove that they actually work at a specific place is by having access to an email address there. However, the service must guarantee that it (or anyone other entity)...
I need an efficient, invertible random permutation of $n$-bit strings, defined by a $128$-bit key. $n$ can be any positive integer from $6$ to $128$. I have no requirements on the security of the permutation; only that it is random (i.e. that outputs for different keys are uncorrelated). Many standard algorithms exist...
In DH, are algorithms with fixed modulus p (large safe prime) to be avoided? What if it was changed every x minutes?
One-way functions generally operate on bit strings, for the input and the output. Are there any examples of one-way functions that produce a combination set in output? Let's call this function $f$. The function would take one bit string in input, of size $p$, and would produce a combination ($k$ elements among $n$). $n...
I am encrypting some information stored in a column of a MySQL database. The column can contain repeated values, let's say the table has 7 rows and the column to be encrypted has the following values: "a", "b", "a", "c", "b", "b", "c" I would like to know if is insecure to encrypt just one time each different value (...
Say I have a publicly available Merkle tree, and I want to prove the existence of a leaf (containing a number, maybe) in the tree. I could give the path along with the siblings, for a normal Merkle proof, but this reveals the leaf itself. How can I do this in zero knowledge, i.e., proving that the leaf exists, but no...
Note: This question was originally asked at Information Security Stack Exchange, but was moved here due to a topic overlap. It is currently recommended by OWASP to use an adaptive key-derivation function, such as Argon2, PBKDF2, scrypt or bcrypt, when storing passwords securely. Is there any advantage or disadvantage ...
The $N$ and ciphertext are huge number that is more than 600 digits long. I'm trying to find the prime factors of $N$ in order to get $p$ and $q$. Using $p$ and $q$ I can get $\phi(n)$. And using $\phi(n)$ and the public key I would be able to calculate the private key. So, my question is if it is possible to reco...
Is it possible to have strings of two (Unicode) symbols with equal SHA-1 hash? For example, smth like "ab", "ba".
i am trying to figure out how Asmuth-Bloom secret sharing works and followed the example on wikipedia and replaced it with own numbers. Namely, i used: $S=3$ $k=3$ $n=4$ $m_0 = 13, m_1=45, m_2=46, m_3=47, m_4=49$ I've been able to construct the shares $s_1 = (17, 45), s_2 = (2, 46), s_3 = (34, 47), s_4=(6,49)$ I then...
I've been reading: https://github.com/bellaj/Blockchain/blob/6bffb47afae6a2a70903a26d215484cf8ff03859/ecdsa_bitcoin.pdf On page 22 it shows an elliptic curve over F17. I have added the orange lines and labels. Do the orange lines illustrate that a line through points at P(2,10) and Q(5,9) also intersects the "curve" a...
I'm looking for some kind of 3-dimensional Elliptic curve. As far as I know a normal Elliptic curve like $$y^2 = x^3 + ax + b$$ over $F_p$ consists of one or two cyclic groups $Z_m (\times Z_n)$. Given one point and one/two generators you can reach each point with it. Now I'm looking for a product of 3 cyclic groups, g...
Does the AES-256 encryption standart have a max input length? If not, does it mean we can even translate a book to it? Like md5 doesnt care max input length?
I have a private key components p, q, Dp, Dq, and QInv. I need to calculate the public key modulus and exponent. Modulus was super simple p*q, but exponent I can't figure out. Have searched all the articles and often found how to go opposite way - generating public private key once you pick the exponenet. I have been t...
Is my calculation correct that to bruteforce XTEA with 128 bit key: https://www.wolframalpha.com/input/?i=number+of+4-permutations+of+4,294,967,295+objects Would require that many permutations? Are there any attacks known to bruteforce it or decrypt? Especially in context of RKE (Remote Key Entry) Thanks,
Given the instance $(n, g, \lambda)$ of Paillier cryptosystem with $\text{ord}(g) = n \lambda$ (symbols have their usual meaning), and $c = g^{na}$, is it possible to distinguish (computationally) $c' = g^{nab}$ from a random element in $\mathbb{Z}_{n^2}^*$, where $b \in_{R} \mathbb{Z}_{n\lambda}$? I believe that given...
I see the claim (which I'm not doubting) that encrypting data using asymmetric algorithms is slower than symmetric algorithms. But I never see citation on these claims, not here, on wikipedia or even in papers. It seems in academic papers RSA and the like are for signatures and are never considered when comparing encry...
I would like to know how openssl verifies a digital signature? I know that it uses this command to verify a signature: openssl dgst -sha256 -verify pkypem -signature signbin msgbin > result What I want to know is, what openssl does exactly with the public key, the signature and the message before verification. I'm als...
I am trying to understand the action of the CSIDH protocol. Let $E_0:y^2=x^3+ax^2+bx$ be a Montgomery elliptic curve over $\mathbb{F}_p$ for some prime $p$. If we take $\mathcal{O}$ as $End_{\mathbb{F}_p}(E_0)$, then $Cl(\mathcal{O})$ acts on $\mathcal{E}\ell\ell(\mathcal{O})$ as follows: Let $I\in Cl(\mathcal{O})$ an...
The pycrypto library in Python can generate random n-bit prime numbers. The syntax I use is as follows: from Crypto.Util import number number.getPrime(2048) The above function has a very impressive performance and returns primes with a very small delay. What is the process used to generate such large primes in such sh...
From Serious Cryptography: "Entropy is maximized when the distribution is uniform because a uniform distribution maximizes uncertainty: no outcome is more likely than the others. Therefore, n-bit values can’t have more than n bits of entropy." The MT strives to have as uniform a distribution as possible, so one would t...
I'm trying to implement bcrypt and have a really fast Blowfish implementation available to me. It seems to me that the existant Blowfish implementation is not going to be able to be leveraged to implement bcrypt since the bcrypt key expansion kinda interleaves the salt and key together whereas Blowfish's key expansion ...
context In a one message communication. We are right after 2 DHKE (instead of one). Both users then have 2 secret numbers, J and K. question Is it a risk to replace the use of a Key Derivation Function with a multiplication of the form S=J**K, creating a big number and only use the bits we need to exchange the only mes...
I try to implement in code the traditional burmester desmedt algorithm for group key agreement: But I have the following question regarding the last step: $K=k_{i-1}^{nx_i}K_i^{n-1}K_i+1^{n-2}\dots K_{i-2} \pmod p$ But when it comes down to boil into code I find hard time to understand what operations are actually exe...
I need to create program that makes signature for selected file. I simplified algorithm a little, because I draw max 64 bit prime numbers instead of 512 bit - like its recommended in Applied Cryptography book. I have already drew private key which is for example: $1848661337$, and now I need to calculate public key. I...
I've generated 100M of random numbers in range (0..255). These numbers fail Dieharder tasts (bitnum = 8). However, I can pass this test by combining four bytes into an int. Randomness of the set didn't change, so, something isn't correct with the test settings. What could cause it? def prep_input(file_name, number...
I have been unable to find any proofs (for my own reference) that demonstrate that Shamir's secret sharing scheme does (or does not) satisfy the definition of $\textbf{differential privacy}$ as provided below: $\mathbb{D}$ denotes the set of possible databases. $\textbf{Q}$ denotes the set of possible queries on the da...
Can I use Salsa20 as a good non-cryptographic PRNG with different streams if I reduce the number of rounds to 8 and omit the addition step at the end? I want to omit the final step because I don't want to get all zero outputs.
Why for achieving the fairness, less than a half of the parties should be corrupted? ($t<m/2$, where $t$ is the number of corrupted parties and $m$ is the total number of the involved parties). How should I prove it? In what kind of network this proposition holds? (Broadcast or peer to peer network)
Would XDES be more secure than 3DES, where X is a number > 3? Like 10DES... If so why aren't we using it?
Why do we have to always attach a 16x 0x10 pad even though the last block is already at block-length?
According to the Wikipedia description of Feldman's VSS scheme First, a cyclic group G of prime order p, along with a generator g of G, is chosen publicly as a system parameter. (Typically, one takes a subgroup of (Zq)*, where q is a prime such that p divides q-1.) Why is it necessary to use a generator g in this pro...
I'm trying to implement MD2 from scratch of RFC 1319. It feels like there is a gap between steps 3.2 & 3.3. After step 2, the checksum C is appended to the message and never mentioned again. We start 18 rounds of XOR-ing for each block using MD buffer X, which will contain the final result. But when I look at most MD2 ...
Reading Dirk Rijmenants's work on One Time Pad and he frequently mentions that it is suited to short plaintexts. I presume this is just because of the practicality of encrypting and decrypting one time pad ciphers? If not why is it not mathematically appropriate for longer plaintexts 1000 characters plus? Presumably ...
It seems that the minimal size of Pseudorandom permutation (PRP) output is $128$ bits. In general, I'd like to see if there's any minimal size of the output of pseudorandom function (PRF) as well? for instance can we set the output size of PRF to 32 or 40 bits. Below, I'm trying to explain the question with an example...
Is there a way to generate a certificate with a pre-stablished public/private plaint text keys? Explaning: I generated some keys on a web site for development propurses, but now one of the parties requires it on a X509 certificate... Sample keys can be generated here: http://travistidwell.com/jsencrypt/demo/
This question is related to the other question I recently asked. I'm trying to figure out if it is possible to use division polynomials to prove that knowing $A = a \cdot G$ we can prove that $a$ is even without disclosing the value of $a$. One useful property of division polynomials that I've observed is that: $$ \psi...
I've found this online currency someone has built as a project and it's "miner" / Proof of Work algorithm is as follows: Generate 32 bytes of random data and hash it, store the original value and the hash Test if the hash begins with a "server key" which is the 3 bytes the hash has to begin with to be valid Submit the...
One thing I know about the Vernam cipher is that the key must not be repeated over the plain-text, for example: Plain-text (hex): 48 65 6C 6C 6F 57 6F 72 6C 64 // HelloWorld One-time-pad (hex): 47 72 61 70 65 47 72 61 70 65 // GrapeGrape Cipher-text (hex): 15 23 13 28 10 16 29 19 28 01 // ?????????? Notice that in ...
It seems to me that cryptanalysis of the autokey cipher relies on patterns being found in key attempts, easy when it's English you're looking for, but how can you do this if you're just getting further cipher texts? How would someone decrypt a plaintext enciphered with an ordinary Vigenère followed by an autokey cipher...
This is a homework question, therefore I'm not expecting full solutions, just general guidance. I want to build a one-time MAC using universal hashing. I defined my hash functions as: $h_{a,b}:\begin{array}{lll} \mathbb{F}_{2^{n}} & \to & \mathbb{F}_{2^{n}}\\ x & \mapsto & ax+b \end{array}$ for $a\in\mathbb{F}_{2^{n}}...
When it comes to the secret sharing schemes, it seems that the random numbers need to be drawn uniformly. Is there any difference between the random numbers from uniform distribution and the non-uniform distribution? Do different distributions affect the security of the scheme?
I am trying to understand how Asmuth-Bloom's secret sharing is perfect. My "proof" so far (in a 3 out of 4 scheme): $y=s + a * m_0 \bmod m_1 * m_2 * m_3$ Having $k-1$ shares, it will yield a valid solution for the CRT, but not a unique one. 2 shares yield $x = y' \bmod m_1 * m_2$ Therefore, we know that $y = y' + z * m...
My math is as follows. If you can do one billion operations per second on a single core, and you have one billion cores available, that translates to $2^{60}$ operations per second, and $2^{100}$/$2^{60}$ = $2^{40}$ seconds, which translates to ~35,000 years. Increase the key length to 128 bits, and the time required b...
Could someone explain how can I find the generator points of an elliptic curve? For example the generators of the EC: $y^2= x^3+x+6, Z_7$.
I know that ECC public key is in fact point on curve calculated by $(x,y) = k \times G$ , while $k$ is random and $G$ is the base point, it performs "Point addition" which involves some math behind. However, in many ECC examples, take this as example: domain parameters $(p, q, g)$ and private/public key pair $(b, g^b \...
I'm wondering if XTS is used (Random Access is needed) what the best solution for authentication is. If I wouldn't need random access, I would take AES-GCM or AES-CBC-HMAC but random access is a must. What mode of operation would be prefered for random access with authentication?
What advantages and disadvantages can be distinguished in NTRU-based and LWE-based schemes relative to each other? In what cases which scheme gives advantage? UPD: I'm interesting in two things: 1)how well-studied their respective hardness problems are? 2)how fast existing NTRU-based and LWE-based PKE schemes relative ...
I’m trying to understand which properties of a group are used in DHKE at each step. For example, Alice and Bob’s public keys appear to only use the closure property of a group and maybe identity (e.g. $k_{pubA}$ = $A^{k_{prA}}$ (mod p)? When creating the shared key Alice and Bob appear to also use the associative pro...
In Sophie-Germain Counter Mode (SGCM), the $GF(2^{128})$ field multiplication of Galois Counter Mode (GCM) is replaced with normal multiplication $\bmod 2^{128}+12451$. Because the block size is 128 bits, the extra 12451 elements of the group do not fit in the output. The SGCM defining document says the following abou...
Given elliptic curve $E$ over binary field $k$, a public key is the pair $(x,y)$ in $E$ and $x$ and $y$ in $k$. The differential representation of $(x,y)$ is $w = x + y$. What security implications are there from using $w$ as the public key, rather than $(x,y)$? Assume the curve is BBE251 (http://binary.cr.yp.to/bbe-2...
I was conducting research on stream ciphers and LFSRs was a subtopic of my research and I was wondering why are LFSRs so popular?
It is said that for the group $\mathbb{Z}_p^*$, the factorization of $p-1$, is critical. If $p-1$ has some small factors $q_1, q_2, q_3, q_4$, then when we transmit $g^x \bmod p$ where $g$ is a generator of this group, the attacker can derive $x \bmod q_1q_2q_3q_4$ How does it happen? Can someone please provide a pr...
Consider a variant of DSA in which the message space is $\mathbb Z_q$ and the hash function is replaced by the identity function. (So the second component of the signature is now $s := k^{−1} \cdot ( m + xr ) \mod q $). Show that this variant is not secure. How would one go about this problem?
Suppose Alice want to share a plain text $x = 5$ to Bob; using RSA, DHKE, and El-Gamal. My question is if Man-in-the-middle attack is applied then weather oscar can compute/decrypt plain text in all of the algorithms if yes then let me how Oscar will decrypt the plain text using the following information In RSA: $p= 3...
I'd like to ask three questions - 2 of them regard CM method. The last is regarding the ECC domain parameters generation on the fly, see https://eprint.iacr.org/2015/647.pdf What role has discriminant $D$? When generating new curve, what I should choose as $D$? I saw $D=1$, but other source says is should be bigger nu...
According to wikipedia both Salsa20 and ChaCha support both 128 and 256-bit keys. The initial state for each has 8 words of key, where each word is 32 bits. 32*8 = 256. My question is... how is one supposed to expand a 128-bit key to fill in the 256-bits needed for the initial state? The most obvious way would be to j...
I am looking for a cryptographic protocol that is as energy-efficient as possible. I am talking about battery drain. Alice wants to do a mutual authentication with Bob. Maybe symmetric is good, maybe asymmetric with PFS is better. I am interested in knowing the best state-of-the-art, non-patented solutions for this iss...
Can you construct a key agreement system from public-key-encryption system? If so, how? What about vice versa?
I am working through the implementation of A Distributed Private-Key Generator for Identity-Based Cryptography. In the paper (Figure 1, page 8) the validation of a share by a node says that once validated the node sends a confirmation or accusation signature to the bulletin board (step 2 below): It mentions these sig...
I have noticed that DBL/diffadd in Edward/Montgomery form almost double fast than Weierstrass form(EFD), and curve25519 is empressive high-performance.The transformation between these forms can be covered by two ModInvs at most(even two ModMults). So the scalar multiplication in specific elliptic curves like p256 or Se...
For my practice implementation of the RSA cryptosystem I use a random value generation function such the value of public key e holds: The public exponent $e$ and the modulus $n$ should be $e<\phi(n)$ $e$ and $\phi(n)$ are coprime, $gcd(e,\phi(n)) = 1$ Although this works satisfactorily, the algorithm returns values ...
I know very little about cryptography, so I apologize if the question does not make sense. Let's say we design a function $F(P, X) \rightarrow K$ that takes in a pre-shared private key $P$ and a publicly available source of randomness (say a server that generates true random numbers) $X$. The output $K$ of this functio...
I have been able properly set up an EC-elgamal protocol by using algorithms available in an IP that I have developed. Everything works fine, except for the fact that I haven't been able to completely "map" my message on the curve. I have converted a string message into hexadecimal ASCII, and used it as the x coordinate...
As we know, Textbook RSA is not enough safe to use because of the following issues; Guessable plaintext problem Small $e$ issue I want to know how PKCS 1.5 solved these problems.
AES provides diffusion at the block level by implementing the ShiftRows and MixColumn sublayers. The former permutes data on a byte level, wheres the latter combines blocks of four bytes. Can it ever be the case that this level of diffusion is insufficient?
I need to create a commitment to a value X such that I can provide either proof that the commitment is to X or proof that the commitment is not to some other given value Y != X. If I use a simple hash with a blinding factor C = H(BF | X) I can provide proof by revealing BF,X and "negative proof" that X!=Y by revealin...
In MixColumn transformations in AES encryption, do we have to Xor the shifted input with 1B only when the leftmost bit is high or is it like the number of times we shift it, and then when a one exceeds power 8 in polynomial form then we have to do it. for eg. if i have to find the transformation 0B.45 i.e. (0000 1011)....
I am trying to understand An Implementation of Efficient Pseudo-Random Functions. There, the following hash function is defined: We define $\hat{h}=\hat{h}_{r}: {\{0,1\}}^* \rightarrow {\bf Z}_R$ as follows: $$ \hat{h}_r(m) = ({\sum_{i=1}^{k} m_i \cdot r^{i-1}}) \bmod R $$ where $R$ is a 161-bit prime, $r$ (the...
There is something intriguing me about this cryptosystem. That is : Let $(S, G, P)$ be the secret key: $S$ : invertible matrix $G$ : generator matrix for some linear code $C$ $P$ : permutation matrix And let $G'= SGP$ be the public key. To encrypt $m$, we compute $Enc(m) = mG'+e$, with $e$ an error vector The th...
I am using a Key Distributed Center (KDC) and a key distribution protocol such as Kerberos. In order to limit the amount of ciphertext produced with the same key, I want to renew the session keys every 2 minutes. However, for performance reasons I only want to involve the KDC once per hour. I thought about extending t...
$\text{seed = 1100010001101001}$ $\text{key fragment = 110001010000101011001011111101100}$ $\text{cipher text = 0xa50b839547f7fe7cf882}$ What is the actual text and how to evaluate it? I would like to know the exact procedure to do it.
I want to use the wiki UMAC example to protect the integrity of the communication between 2 devices. Unfortunately I am not quite sure of the meaning of the parameters and I don't want to get it wrong: The following C function generates a 24 bit UMAC. It assumes that secret is a multiple of 24 bits, msg is not longer...
Does knowledge of SHA256(secret) and SHA256(secret ∥ known constant) give any more information about the secret than just knowledge of SHA256(secret)?
While looking at division polynomials of elliptic curves in relation to this and this questions, I noticed some patterns. I am wondering if anyone knows of general formulas the describe these patterns. First, an example: Suppose we have an elliptic curve defined by $y^2 = x^3 + 2x + 10$ over $\mathbb{Z}_{q}$ where $q=5...
I'm currently practicing on a purposely flawed login page, where I have to change the value of a cookie to enter. The cookie is an encrypted and encoded form of a simple JSON string with fields "admin", "username", "password". The admin field is set to 0, and the user/pass fields accepts anything. To login, I have to c...
Could anyone guide me on how to implement FPE (Format Preserving Encryption) for Email address masking? For example: if my ID is Poornima1@gmail.com then it should be encrypted something like asdfghjk4@zxcv.qwe Preserving the format and datatype.
My understanding of how /dev/urandom works is that the kernel collects true randomness from a variety of sources, and mixes them together to remove statistical bias. It does this at regular intervals to refresh the entropy pool. The CSPRNG then takes a subset of these bits to generate random bits for consumption. My qu...
Lets say we use RSA as the signature method. Alice wants to send a message to Bob and uses RSA signing. For that she signs her message with her private key. But everybody could now have access to her message if one just decrypts the signature with Alice's public key. What is the point of digital signatures if confident...
I could not understand one step in correctness proof of paper titled "A tree-based CP-ABE scheme with hidden policy supporting secure data sharing in cloud computing" authored by Runhua Xu, Yang Wang, Bo Lang. Link to paper: https://www.researchgate.net/publication/271482056_A_Tree-Based_CP-ABE_Scheme_with_Hidden_Pol...
Suppose that we want to implement the following equations in binary finite field. $$ \begin{array}{l}\tag{1} y_{{1}}=x_{{1}}\oplus x_{{2}}\oplus x_{{7}}\oplus x_{{8}},\\ y_{{2}}=x_{{1}}\oplus x_{{2}}\oplus x_{{6}}\oplus x_{{8}},\\ y_{{3}}=x_{{1}}\oplus x_{{2}}\oplus x_{{7}},\\ y_{{4}}=x_{{2}}\oplus x_{{8}}. \end{array}...
Is there a way to prevent the shared secret to be a small value (eg 4) to avoid easily succeeding brute force attacks? In $g^a \bmod p$, I understand that choosing $p$ not a multiple of $g^a$ is a first step. But other than that, are there fast ways to achieve that goal? Thanks
I'm newbie in the word of TLS, and need some verification about my picture. I can use TLS with 3 or 2 participants: 3 participants: Client, server, CA (certification authority). The CA is where the server's certificate is signed in, or created by a CA comp. The browser trusts in it automatically, because they have som...
I try to understand the private and the public key concept, and need some validation about my statements: If I encrypt a message with public key, I can only decrypt with private key. If I encrypt a message with private key, I can only decrypt with public key. I can generate public key (derived key) from private key(b...
To my knowledge it works like this: The server receives the username-password values over a secure & encrypted channel. The username-password values are decrypted in the server and are present as plaintext. With the username the according salt gets retrieved for the user. The salt is appended to the plaintext-password...
Let's say that I have to use fractions instead of integers and I am using Paillier cryptosystem. So, I use scaling to obtain integers. Assume that I have a secure division protocol. What happens if the result of the division is not an integer? Scenario: The scaling factor is 10. $x = E(10)$ // encryption of 1 $y = E(3...
I'm trying to categorize my knowledge. Can I place block ciphers and stream ciphers under symmetric with RSA/DH under asymmetric?
In this paper Maurer and Aggarwal showed that in generic model of computation breaking RSA is equivalent to factoring. It is also known that the LSB of an encrypted message is as hard as breaking RSA.(i.e If there is an algorithm that find the lsb of the message m from the ciphertext c, then we can recover m). So I was...
Suppose that Alice has attributes A, B and C. I have a ciphertext with this policy: A AND C. Can an adversary guess the attributes and then decrypt the ciphertext? What is the probability of guessing attributes in a ciphertext policy attribute based encryption?
I have a following use case: User has his master public (pk) - private (sk) key pair (Ed25519). In DB we store a public key. Is there any derivation mechanism D, where when knowing a derivation parameter x we can use it derive a new private key sk2 = D(sk, x) and public key (knowing only public key in DB): pk2 = Dx(pk,...
RFC 7539 says: A 96-bit nonce -- different for each invocation with the same key It doesn't explicitly say whether it has to be random or not. If we use an ever incrementing counter. Would that be secured? Generating cryptographically secured random number is a slow process.
In A Generic Approach to Invariant Subspace Attacks the authors defined an invariant subspace as: $$F(u + A) = v + A$$ Where $F:\mathbb{F}_2^n \to \mathbb{F}_2^n$,$u, v \in \mathbb{F}_2^n$, and $A$ is a linear subspace. Then they claimed that if $M\circ F = F\circ M$ for a linear subspace $M$ then $A:=ker\left(M+Id\ri...
Is this question valid as $n=100$ is not a product of two primes, but can be expressed as $100=2^2 5^2$, if valid is there any criteria for choosing $d$ and other values?
Consider the following modification of the Blum-Micalli construction (denoted by BM): $G_l(x) = f^l(x) || BM^l(x)$ I am asked the following questions about it: Show it is a PRG of fixed stretch for every fixed $l$ polynomial in n. Discuss the advantages/disadvantages of outputting also $f^l(x)$. In particular, consi...
I'm implementing Salsa20 in Rust for fun. I have the initial state (4x4 32-bit matrix) setup from the key, nonce, and stream position 0. I'm using the Wikipedia Salsa20 article as reference, and I'm confused on how to encrypt the first block. QR is applied on the 4x4 matrix, but how do I "mix in" the input? Is there a ...
Recently I've been learning about cryptography and so far I am loving it. However, there are some things I do not comprehend. As far as I know, RSA was published in 1979 while New Directions on Cryptography by Diffie and Hellman was published in 1976. What I wonder is, what motivated the creation of RSA? Was it becaus...
Consider a function to create a tamperproof cookie as follows: $$\text{cookie}(m, k) = m \| \text{hash}(m \oplus k)$$ where $m$ is a message provided by Alice, and k is a secret key known only to Bob. Bob receives m from Alice and returns the cookie to her. $\text{hash}(m \oplus k)$ functions as a MAC. Why doesn't this...