instruction
stringlengths
32
27.2k
Popular RSA modulus sizes are $1024$, $2048$, $3072$ and $4092$ bit. How many random odd integers do we have to test on average until we expect to find one that is a prime? I know roughly every $\ln p$ integers has a prime. For a $1024$ bit $p$, $\ln p = 710$. On average, need to test about $710/2=355$ odd numbers befo...
I've stumbled upon many opinions, so I ask about them myself. Let $H(x)$ and $F(x)$ be hash functions. is $H(F(x))$ or $F(H(x))$ safer than $H(x)$ or $F(x)$ is $H(F(x))$ or $F(H(x))$ safe when $H(x)$ or $F(x)$ becomes vulnerable is $H(H(x))$ safer than $H(x)$ Background Doing my own research, I found statements sugge...
What is the Indifferentiability of Feistel Network? Why is the concept of Indifferentiability useful and how it is applicable in the real world? How is Indifferentiability compared to Indistinguishability?
Lets say there is mutual authentication between a client which connects to a server on an otherwise unsecured TCP channel. Both parties create a random challenge and the other side answers with a keyd-hash, based on a pre-shared symmetric key. $$C\rightarrow open \,\, connection \rightarrow S$$ $$C\rightarrow challeng...
Background I understand the interactive version of Schnorr's protocol and I understand how the simulator can generate an output that is i.i.d to the output of the prover-verifier: Question What I don't understand is how does the simulator generate a correct transcript when we move to the non-interactive version of th...
I am given a private RSA key, which header indicates that it is AES-128-CBC encypted. Note that the last ten lines of the key are missing. (This is part of an educational task.) -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,8B7CE35DB731727CEABA217FAE404DB8 ... 37 and a half lines with 64...
I'd like to know if LWE (and its variants: RLWE and MLWE) can cipher messages bigger than 1 bit. Is it possible? I didn't find any reference yet. Could you explain it to me or give some good references about it? Thanks in advance. UPDATE: I read some papers and maybe my question should be a bit different: Are there sch...
The "birthday paradox" places an upper bound on collision resistance: if a hash function produces $N$ bits of output, an attacker who computes only $2^{N/2}$ (...) hash operations on random input is likely to find two matching outputs. If there is an easier method than this brute-force attack, it is typically considere...
Let's say I need performance on 64-bit machine, then SHA3-512 is the way to go. SHA-512/256(x) is SHA-512(x) with output truncated to 256 bits, according to https://pycryptodome.readthedocs.io/en/latest/src/hash/sha512.html Let H1(x) be SHA-512/256(SHA-512(SHA-512(x))) Let H2(x) be SHA-256(SHA-512(SHA-512(x))) Is H1 sa...
For doing exponentiation in a group for which inversion is trivially easy, such as elliptic curve groups, is there an algorithm for computing the $w$NAF ("$w$-ary non-adjacent form") array faster than $O(n^2)$? The standard algorithm is listed on Wikipedia as (translated to Python): def wnaf(d): result = [] fo...
I'm working on creating a secure digital vault. I'm using mnemonic to generate a seed. The seed is used to generate a signing key pair for identity verification. However I want to also encrypt the contents of the vault for recovery purposes. Can the same seed be used for signing, and for encrypting the data? (I can add...
Edit: if anyone, inexperienced like me, lands on this question, it has been answered at the stackoverflow. Why the Python code, see below, returns false? More context: I am going through the FIPS 186-4 and on the page 43, there is a algorithm, A.2.3 Verifiable Canonical Generation of the Generator g, to generate gener...
When a Schnorr signature is created, the number $r$ is concatenated with the message to produce a new value which is then hashed to give a number represented by $e$. The number $e$, accompanied by some other data that is used during validation, will then be sent over to a signature verifier. The signature verifier will...
I acknowledge that QROM differs from ROM (which can be considered as a specific QROM which performs a measurement to the input). For example, one can find a preimage for an arbitrary value with $O(N)$ queries to ROM while with $O(\sqrt N)$ queries to QROM by Grover's algorithm. However, this requires more than $O(\sqrt...
When trying to reverse a hash function, there is loss, e.g. a+b=c given c=5, try to go back to a,b (previous step) (a,b)=(5,0),(4,1),(3,2),(2,3),(1,4),(0,5) but, given any of the (a,b) pairs, we get c=5 in the next step, and each of these pairs have the same exponential growth applied when reversing them. Thus, it see...
Most PSI papers usually use hash-to-bin to improve the number of comparsons. For unequal set sizes in 2PSI, I have read CCS17, which designs a PSI protocol for unequal size. The party with fewer elements use cuckoo hash, The party with more elements use simple hash. I want to know the reason why the party with fewer el...
Firstly I know that what I'm asking about is not practical, so let's keep it theoretical. Let $B[H](x)$ be balloon hashing with $H$ as it's underlying hash. What happens if I do $B[H1](B[H2](x))$, where $H1, H2$ are distinct hash functions based on different construction, let's say blake2b and sha3? Where do I lose sec...
I understand the original O(n) implementation of a ring signature, but I'm trying to figure out where the state of the art is on signing a message as an anonymous member of an ad hoc group without revealing which member of the group signed it. It seems there are sublinear implementations, but I don't have a good grasp ...
Consider the learning with errors problem. Assuming LWE (or a variant of LWE, like ring LWE) is hard for polynomial time algorithms, can we construct a family of pseudorandom functions from there?
Edit suggested by fgrieu: I have one hundred integers in $\{0,1,2,3,4,5\}$ which I suspect are consecutive values of $\lfloor x_n/2^{16}\rfloor\bmod6$ computed as $x_{n+1}:=a\cdot x_n+b\bmod m$, with $m=2^{31}$, and $(a,b)\in{(214013,2531011),(22695477,1)}$. How do I validate that hypothesis, find the $(a,b)$ used, and...
Compared with the common lattice-based PQC schemes, the modulus $q$ and dimension $n$ of homomorphic encryption are so large. For example, in Kyber, $n=256, n \times k = \{512,768,1024\}$, $q = 12289$ or $3329$, while in FV or other HE schemes, $n$ could be $2^{14}$, and $q$ might reach $2^{744}$. Both of them are bas...
I wanted to do some practice on security reduction proofs, and I am stumped on this one from the Boneh-Shoup book. If $F(k, x)$ is a secure PRF, then show that $F'(k, x) := F(F(k, 0^{n}), x)$ is a secure PRF. What I have so far is: Suppose $F'$ is insecure, with a distingisher $D'$. This means that $F$ is also insecure...
Background: I'm developing an app that is based around registered users voting on stuff, and I want to create a heuristic that involves IP addresses as one way to flag accounts for further investigation of potential multiple account+vote abuse. In the interests of privacy/data minimization/GDPR obligations, it appears ...
If I understood correctly, the Signal protocol generates a new key after every message sent and forgets the previous one. Telegram, on the other hand, renews the key only after 100 messages or one week. Thus, is there a certain attack window (1 week / 100 messages) with Telegram's protocol?
A bit of a background about me; Computer Engineer but during my studies I didn't dive too deep into the maths, especially the crypto maths that is used to make the blockchain and cryptography work. I'm looking for advice from any senior or experienced researchers or practitioners in this field to give me some advice an...
Is it a security risk - or perhaps, how big of a security risk is it - if an attacker knows the length of the values of P and Q used when deriving a value for the parameter N in the RSA encryption algorithm? I've been doing some reading on implementations of RSA and I see that some require P and Q to be the same length...
Currently, I'm using a static IV value for all encryption and decryption but I would like it to be dynamic for each encyption/decryption request so I started using new byte[16] and it works. The problem is how to detect and decrypt old data. Below is my code to decrypt and I'm passing static IV stored on a secret in ke...
Here is the Scheme: Here is the HIDE game: Here is my idea but I am not quite sure. I would appreciate some input. We want to bring advantage = 0 for all adversaries. We can show that advantage = 0 if we can prove that all of the C values are uniformly random and independent of the Message we give. If we prove that ...
Which of the following are easy, if any? Which are hard? and why. Case 1) Given $x^3 \bmod N$, where $N$ is a composite number and we don't know any of the factors of $N$, find $x$. Case 2) Given $x^3 \bmod p$, where $p$ is prime, find $x$. Here is what I think but I don't fully understand it. For case 1, this is assu...
Here is the game: How can I make an $\mathcal{O}(k^2)$-time adversary making only one query to its Fn oracle and achieving advantage $= 1 - 1/(p-1)$ Here is my idea so far: query $2^{-1}$, which when it goes through the Encryption algorithm, will return 1. So, Adversary A: C <- Fn(2^{-1}) if C == 1 return 1 else ret...
is there an encryption algorithm that allows to: generate a set of different private keys sign data with those private keys allow to publicly verify that such a signature has been created by ONE of keys in the set without revealing which one it was give the person that did create the signature a way to create a proof ...
Why is it hard to compute $$(g^x\bmod p, g^y\bmod p) \longmapsto g^{xy}\bmod p $$ when can we quickly compute $$x \longmapsto g^x\bmod p$$ ?
Suppose RSA is considered a "secure" method for encryption. RSA is meant to encode a sequence of integers base $27$. If we use an $n=pq$ that is hard to factor, Is it still secure if we encode every integer (letter) separately rather than the whole phrase once? Edit: I didn't expect to get such great answers. Thanks ev...
Let $X = [0, 1]\cap \mathbb{Q}$, and let $f:X \rightarrow X$ be a chaotic map (i.e. the logistic map with rational parameter). My question is as follows, and is purely theoretical in nature. Pick some value $x_0$ from $X$ (note that $X$ is infinite here, so pick a value using the axiom of choice), and then consider s...
I have files in my computer that are being uploaded to a cloud storage provider (Sync) that specifies that files are encrypted on the client's side, then uploaded to their servers, and that only has the key to decrypt the files. So files can only be decrypted on my computer. Now my question is: Do encryption hide file ...
For the blind signature that can sign on a commitment, I mean finally, the user can get a signed commitment, rather than a signed message inside the commitment. It means the verification also takes a commitment as input. Is there such a blind signature?
Problem: You see Michael and Nikita agree on a secret key using the Diffie-Hellman key exchange. Michael and Nikita choose $p = 97$ and $g = 5$. Nikita chooses a random number n and tells Michael that $g^n \equiv 3\pmod{97}$, and Michael chooses a random number $m$ and tells Nikita that $g^m ≡ 7 \pmod{97}$. Brute force...
I feel like I some understanding of cryptocurrencies, but what never made sense to me are NFTs. This is my current understanding of NFT's NFT's are a type of smart contract Smart contracts aren't necessarily open source, but you do have access to the bytecode The actual NFT isn't stored on the blockchain, but rather o...
According to the HMAC specification in RFC2104, an HMAC is computed in the following way: HMAC(K, text) = H(K XOR opad, H(K XOR ipad, text)) where H is the underlying hash function, , is concatenation and K has the length of one block. Now I wonder, what is the benefit of applying the hash function twice here, that is...
Given a lattice L and a vector $v_1$ claimed to be the shortest, what is the fastest way to check/verify whether $v_1$ is indeed the shortest in the lattice?
I have a string whose size is < 32 characters from the following limited character set. uppercase and lowercase Latin letters: A to Z and a to z digits: 0 to 9 special characters: !#$%&'*+-/=?^_`{|}~ I am looking to encrypt this string with a public key where the resulting message is < 64 characters. I understand the...
I'm reading the Wikipedia for HMAC, and I feel a little bit lost. I'm wondering if there exists... $$digest = \operatorname{HMAC}(msg, key)$$ Is it possible to prove that $digest$ is computed from $msg$, without knowing the $key$?
Let us assume three entities: $A, B,$ and $C$, and let $[p_C, P_c]$ the private/public key pair of $C$. Assume that $A$ encrypts a message $m$ using the public key of $C$, $P_C$, and sends this encrypted message $c$ to $B$. My question is: can $B$ somehow discriminate that the encrypted message $c$ is the result of the...
Let $\mathbb{F}_q$ be a finite field of size $q$ (prime), and $\mathbb{F}_{q^n}$ be a degree-$n$ algebraic extension of $\mathbb{F}_q$. Let $F$ be a polynomial function $\mathbb{F}_{q^n} \to \mathbb{F}_{q^n}$ of the form $$ \sum_{i, j \in I_A} A_{i,j} X^{q^i + q^j} + \sum_{i\in I_B} B_i X^{q^i} + C $$ where $A_{i,j}, B...
Let's suppose I want to use a cipher with a large key size, such as ISAAC that supports 8192 bits ogf key. I can hash with sha-256 or sha-512 and iterate until reaches the key size but I won't get 8192 bits of security as the internal state of this hash functions are capped to 256 or 512-bits. I can hash with a XOF (eX...
I want to encrypt my mails and sign them with my digital signaure. I just don't know how/where I get it. what is a good/trustworthy CA? how do I generate those keys? I wanna use EC, which length, which curve, how? Pretend I am dumb and really wanna be more secure in my everyday. And wanna sign some contracts with dig...
The LWE-cryptosystem is only CPA-secure as for example stated in A Decade of Lattice-Based Cryptography. Consider the following system described there (Section 5.2) The secret key is a uniform LWE secret $s \in \mathbb{Z}_q^n$, and the public key is some $m \approx (n+1) \log(q)$ samples $(\bar{a}_i, b_i = \left <\bar...
I know this topic has been discussed many times on this platform; however, I still lack the intuition behind proof systems' zero-knowledge property. I understand that goal of the simulator is to simulate the real transcript between the verifier and prover. So if the simulator can create a transcript without having acce...
As far as I understood, the core of the RSA algorithm is to have 2 (large) primes ‘p’ and ‘q’, so that ‘n=pq’. Then ‘n’ is the public key, and ‘p’ the private one. The security comes from the fact that given ‘n’ is not easy to obtain ‘p’ and ‘q’, whereas it’s trivial to check that ‘p’ does factorise ‘n’. My question is...
If I understood it correctly, in CTR mode I encrypt the nonce or IV together with the counter as a block, which is then XORed with the plaintext. For the next block, I increment the counter. Is there a fixed size of the counter to be able to iterate through all blocks, or does it start again at 0 at some point? For exa...
The title must be confusing. Imagine we have this curve: $y^2 = x^3 + 9x + 17$ over $\mathbb F_{23}$ And we know [4]P = (19 , 20) [8]P = (12 , 17) If we only have the value of $[8]P$, Is it possible to calculate $2^{-1}X$ and $2^{-1}Y$ of $[8]P$ to get $[4]P$?
I'm looking into Shamir's Secret Sharing algorithm and it's clear to me how it works but I don't understand the exact reason why we need to find a prime number and do modulo arithmetic using that prime. On Wikipedia, it says that if you don't use modulo arithmetic, an attacker could get some information on the value wi...
i'm studying for my basic crypto class and I'm trying to formalize the algorithm for the parameter generation of RSA, unfortunately, I cannot find any algorithm, just plain text. Can someone tell me if this algorithm could be accepted? Please focus more on the public exponent $e$ KeyGen() Let $p,q$ be two random prim...
Are there references or prove to say that multiplying two points in the elliptic curve cryptography ECC is not allowed, as an example below? Multiply the public key PKA by a point (Z) on the ECC since these two parameters (the public key and the point) are both points on the ECC. $C=′\oplus h(Z.PK_A\mathbin\|T_1)$ $Pk...
I've implemented classic Shamir Secret Sharing Scheme which looks like this: get password as input (any length) convert password text to big integer generate polynomial coefs (an ... a1) generate splits - pairs (xi, yi) with given threshold It works great and this is how generating more shares of secret works: getti...
I was just wondering how the following construction could be insecure. I can tell that known-plain attacks are possible, but I'm not sure about anything else. Let the user pick a password and hash it a sufficiently large number of times with something with preimage resistance like SHA-256. XOR the plaintext with the ha...
I know that it is hard that find a small $x$ when we know $(A,Ax), Ax=f(x)$ if is GCK on the cyclic lattice. Then is it hard to find small x_i when we know $(A,X)$ that $$X \leftarrow A_1\cdot x_1 + \cdots + A_n\cdot x_n?$$
I have a code for polynomial multiplication and it is written in C. I heard that whether a particular instruction is "constant time" can vary by architecture and by processor model and there isn't any official documentation for this behavior. How can I understand if my code is constant time or not? Note: By "Constant t...
I have my x (0xca668a8b5f71e8724aada4b5343c28702a481787855cc42228b8fff97fe94d6a) and y (0x19dd3a603a55b3d8c5f62cbe177b9b63693fb8c91d76845bafc843a7aa19ea55) coordinates generated by ecdsa with a private key. But don't know yet how to get the public address from (x,y) coordinates and a compressed bitcoin address ?
I'm presently implementing a simple RSA-based encryption as follows in PHP (using openssl_public_encrypt): // $sRawText is the text string to encrypt. // $sPublicKey is the public key stored on the server. openssl_public_encrypt($sRawText, $sResult, $sPublicKey, OPENSSL_PKCS1_OAEP_PADDING); // $sResult is the encrypted...
Consider the following. I have a decentralized network of nodes that can talk to each other, and I'd like to encrypt their communications. I turn to asymmetric encryption, the way most of the internet works, and since I've used Google Tink and have some handy code already written out for it, I go for Hybrid Encryptio...
Say that there are two unrelated ECC keypairs ($Pub_1$, $Priv_1$) and ($Pub_2$, $Priv_2$). Alice claims that she knows both $Priv_1$ and $Priv_2$, but Bob doesn't trust her, and thinks that $Priv_2$ is only known to Eve, Alice's friend. Bob asks Alice to prove that she controls both private keys. Now, Bob knows that if...
Boneh et al. [1] describe an aggregate signature scheme, which allows signature aggregation of $n$ distinct messages from $n$ distinct users into a single short signature. In their description, they quite clearly state that it is necessary that the messages are different to the ensure the security of the protocol. (The...
Can anybody explain the proof of Rabin and Ben-or of secure multiparty computation? The idea is that every player $i$, of $N<+\infty$ players, holds a secret say $s_i$. All of them want to share their information in such a way that a rule function $f(s_1,s_2,\cdots,s_N)=(a_1,a_2,...a_N)$ is shaped and every player at t...
Given a OW function $f:\{0,1\}^n\to\{0,1\}^n$ with hardcore predicate $h(x)$, you can build a PRG $G$ by setting $$G(s):=f(s)\Vert h(s), \quad s\leftarrow\{0,1\}^n.$$ The expansion condition for $G$ is trivially satisfied (the seed $s$ has length $n$, while the string $f(s)\Vert h(s)$ has length $n+1$). How can I show ...
In the game-based definition, we say that $G: \{ 0, 1 \}^n \rightarrow \{ 0, 1 \}^{\ell(n)}$ is a pseudorandom generator if For all ppt distinguishers $D$, there exists a negligible function $\nu$ such that: $$Pr[D( r) = 1] - Pr[D(G(s)) = 1 ] \leq \nu(n) $$ Where $r \gets \{ 0, 1 \}^{\ell(n)}$ and $s \gets \{ 0, 1 \}^n...
As i know, generally nowadays hybrid protocols are more widely used than either symmetric or public key cryptosystems separately. I read that public key system is used to exchange and share secret via insecure channel so that the key is then used in symmetric cipher. Also, there is otp, which is unbreakable as its info...
Let's say I'm designing a communications protocol that will be used by many pairs of devices to communicate amongst each other (between the pairs only). Assuming the devices in the pair can communicate with each other in a cryptographically secure way using, for example, digital signatures, and at least one is occasion...
Maybe I got this wrong, but if the Zeta function is efficient to compute and reverse, and if Riemann's assumption is true (which it seems like), can't we use the Zeta function to efficiently find prime factors of large numbers and find private keys of public RSA keys?
[GPV] and [MP] (references below) give constructions of the trapdoor function defined by $$ f_{\mathbf A} (\mathbf x) = \mathbf A \mathbf x, $$ where $\mathbf A \in \mathbb Z_q^{n \times m}$ is uniformly random, and the domain is $\{ \mathbf x \in \mathbb Z^m \mid \lVert x \rVert \le \beta\}$. Given any $\mathbf y \in ...
Alice wants to share a secret $S$ with Bob so she encrypts it with Bob's public key. Bob is not online at the moment so Victor will keep it safe for him in the meantime. Victor the verifier would like to verify the ciphertext is indeed the secret $S$ without actually knowing the secret $S$ himself. Victor can reliably ...
I have a question about the security proof. Suppose that I proved the following relations. That is, I proved that $Adv_A \le Adv_A^{O} \le Adv_B$, where A,B are some cryptographic schemes and O is an oracle. I also suppose that the oracle O has a very strong property. For example, the O can solve DLP in polynomial time...
In my application, the user logs in when connected to the central database, and their login credentials are authenticated against that data and cached (encrypted). Then, when the user is offline, their credentials are authenticated against that cache. So far so good. But sometimes, the user MUST use the application whe...
There is a sentence in Oded Regev'lecture note that "$0$ is part of any lattice and hence the closest vector to $0$ is $0$ itself!". I'm having trouble understanding it. Can someone help me understand it?
My idea was to balance password entropy and memorability. Is there some tool I can use to benchmark generated passwords? Would a state of the art password cracking tool measuring the time to crack a given password be a good idea?
Generally, when we want to generate a signature for message M we use hash function H, and sign the result of H(M) with the private key. What if instead of hash function H we would use a CMAC with key K, and then sign the result of CMAC(M, K) with private key? Is such operation cryptographically secure? If so, does the ...
I've got working first part of SSS scheme so I can use some secret number as an input and generate some random polynomial function and create simple shares as pairs (xi, yi). The task is how to get secret reconstructed from shares? We all know that we must do some clever math guessing to find coeffs. What are options o...
It's said that quantum computers can break block ciphers with 2^(n/2) queries (being n the key size). I read this paper: https://eprint.iacr.org/2016/197 It says that CTR and OFB modes are safe against quantum adversaries. That left me doubts. Can a quantum adversary break a block cipher in CTR/OFB mode with 2^(n/2) qu...
I'm trying to implement the zero-knowledge proof presented in this paper. The proof has a rejection step (page 14), which can be computed as follows: Where B and Z are in $R^{m \times n}$ for some ring. Although I understand how it works for the ring $R=\mathbb{Z}$, I don't get the point of how could work when $R=\mat...
Shamir Secter Sharing in standard version (paper version) works pretty good with Lagrange Interpolation to generate more shares. Problems arise when you generate more pairs (xi, yi) and you try to reconstruct the secret from shares which are kind of distant to each other. Algorithm works but value of secret you get is ...
I am new to cryptography, I am trying to design a secure pipeline environment for the fast transfer of messages. To reduce the Key size I am planning to encrypt the messages with AES session keys (for a session or an epoch) and within each session, I am planning to encrypt each message with lightweight keys like DES (c...
Assume $(Gen, Enc, Dec)$ is a public-key encryption scheme with message space M that is CPA-secure. Prove that the encryption scheme $(Gen^2, Enc^2, Dec^2)$ is CPA-secure. $Gen^2=(pk_0, sk_0) \leftarrow Gen, (pk_1, sk_1)\leftarrow Gen$ output: $pk=(pk_0,pk_1)$ and $sk=(sk_0,sk_1)$ $Enc^2(pk, (m_0,m_1))=(Enc(pk_0,m_0),E...
I'm a beginner. But I understand that the order of a subgroup is a divisor of the group order. The curve $y^2=x^3+7$ over $\mathbb{Z}_7$ has eight points (7 points and the point at infinity). The order of the point (0,0) is 2 (?), but the order of all the other subgroups is 7, not 8. This seems to violate LaGrange's Th...
If one looks at Account Settings > End-to-End-Encryption > Add Key and creates a new key then gets the option EC. But you can't choose the bit length nor does one know which curve is used. Anyone who knows that? Anyone who knows how secure that is?
In Niederreiter cryptosystem, we require the message to be a vector of weight $t$ in $F_q^n$ in encryption, assume $t$ is the error-correction ability of the code. But what is the mapping? One possible way is mapping the message of length $k$ to a codeword of a constant weight $t$ linear code, e.g., $[n,k]_q$ code. In ...
Can we encode with the set of $\{0,1\}$ and its Boolean operations any infinite domain that is subset of the real numbers $\mathbb{R}$ or the whole set of real numbers? For example can we encode the domain of a random variable $X$ that is a subset of the real numbers? Suppose that the random variable is normally distr...
I'm working on an internet election system that requires the shuffling of ballots accompanied by an interactive proof of the legitimacy of the shuffle. I am working on this paper and I am stuck at the part outlined below: By releasing the single value $(r'-r'')\mod(p-1)$, the two ElGamal pairs $(x',y')$ and $(x'',y'')$...
In the literature, I can’t find the S-Box component of SHARK block cipher. I appreciate if anyone help to find the elements of the S-Box of this cipher.
I am currently going through past finals' questions as exercises for my exam and there are no solutions provided. The question I am currently doing is: Let ∏ = (Enc, Dec, Gen) be a CPA-secure Encryption Scheme. Prove or disprove the following two statements: a) Enc must be a pseudo-random function. b) Dec must be a pse...
Say Alice wants to send a PGP encrypted message to Bob. She generates a symmetric key, encrypts it with Bob's public key, and sends both the message and the encrypted symmetric key to Bob. Then Bob is able to decrypt her message. But what if a MiTM attacker modifies both the encrypted symmetric key, and the message, an...
According to BIP340: However, a major drawback of this optimization is that finding collisions in a short hash function is easy. This complicates the implementation of secure signing protocols in scenarios in which a group of mutually distrusting signers work together to produce a single joint signature (see Applicati...
I am looking for some sort of hash function that is resistant to ASIC so something that works well on a CPU but is not very good with other hardware like a GPU or ASIC
On Wikipedia's Related Key attacks page, there is a section about WEP as an example to related key attacks. Encryption uses the RC4 algorithm, a stream cipher. It is essential that the same key never be used twice with a stream cipher. To prevent this from happening, WEP includes a 24-bit initialization vector (IV) in...
While I expect to get flak for the term "best", some algorithms are widely considered better than others for essentially all purposes. For example, DES is no longer considered secure. My particular problem is that I want to use keytool to generate a Java keystore, containing an asymmetric key, and don't know what algo...
I'm using PBKDF2 to generate an ED448 signing key, and I'm trying to figure out the optimal salt size for SHA-3. I recall reading a recommendation to use a salt size equal to the PRF's internal-state block size, for PBKDF2. My understanding is that Keccak/SHA-3 doesn't use blocks the way SHA/MD hashes do. So how do I p...
I came in contact with a ciphertext, which is: KCCPKBGUFDPHQTYAVINRRTMVGRKDNBVFDETDGILTXRGUD DKOTFMBPVGEGLTGCKQRACQCWDNAWCRXIZAKFTLEWRPTYC QKYVXCHKFTPONCQQRHJVAJUWETMCMSPKQDYHJVDAHCTRL SVSKCGCZQQDZXGSFRLSWCWSJTBHAFSIASPRJAHKJRJUMV GKMITZHFPDISPZLVLGWTFPLKKEBDPGCEBSHCTJRWXBAFS ...
If I have a message that has a fixed unknown length $L$, and we add to it's TLS encryption a random sized padding $0\leq n \leq N$ so the sent message if $L+n$. I'm also able to make the target re-encrypt and send the message over and over again. How many times do I need to make the target send the message over and ove...
I am trying to understand Hybrid encryption. When I first came across the term I though it is used to describe a scheme where the message is encrypted using a symmetric key, and the symmetric key is then encrypted using the receiver public key. Both (encrypted message and key) are then sent to the receiver. But it seem...
In case multiple stream ciphers exist, I'm refering to this specific instance in which you generate a key that is just as long as the msg, M, as a function of a nonce and a smaller key K. My textbook classifies this as computational secure. But why is that? I would say that it was unconditionally secure since assumin...
I'm trying to figure out when using DKIM it signs all of the email including the body message and the from address , and with pgp it uses a unique key while in dkim is a general key ... but with both encryptions the email can still be changed ? they can just inform me wether the email has been changed but they can not ...