instruction
stringlengths
32
27.2k
I know about ECDH when you need 2 pairs of public/private keys. But I wonder what is a simplest way to encrypt with just single public key? Should I select a second random pair of public/private keys for each "boxing"? or I can have a pre-selected publicly known pair of public/"private" keys? or Is there other sim...
Having this web of trust scheme, I have a question concerning third scenario in which we assign Dharma and Chloe a marginal trust. In case of Dharma the situation is clear, we sign her public key and assign our marginal trust in it. But how physically we can assign a marginal trust in Chloe's public key when we don't ...
I understand that PUFs (physically unclonable functions) produce unique output based on challenge input because of their sensitivity to manufacturing differences, but not how the actual authentication works. It sounds like one approach is to have a server that keeps a table of known responses to challenges, but wouldn'...
Why do we limit the number of queries to Encryption or Decryption oracles in the security analysis of various encryption schemes to be polynomial in the security parameter n?
In OFB mode, I understand that a bit flip in $c_i$ for $i > 0$ only causes a bit flip in message block $m_i$. However, how is it possible for a bit flip in $c_0$ (i.e, in IV) will result in all the plaintext blocks being recovered incorrectly.
When $x < N$, there cannot be the same encrypted message with different outgoing messages. But why?
Let $(K_{enc},K_{dec})$ be an asymmetric key-pair. It seems to me that a signature scheme can be created by letting the public verification key be $K_{ver}=K_{dec}$ (the asymmetric decryption key) and the secret signing key be $K_{sign}=K_{enc}$ (the asymmetric encryption key). Say with $H$ some hash function and $m$...
I'm aware that the Miller–Rabin primality test will claim primality for a composite number with at most a $\frac{1}{4}$ probability for some arbitrary, odd composite $n$ and a random witness $a$ chosen uniformly in the range $[2,n-1)$. What is the actual average chance that that the test falsely claims that the number ...
can we still consider the second function negligible ? is there any main differences between them?
I've come across a form of cryptographic security that I've never heard of: entropic security. I've read the Russel et al abstract and that doesn't seem to bear much relation to the wiki article. Things that confuse me are like:- "Deterministic encryption" :A deterministic encryption scheme (as opposed to a probabilist...
In my hobbyist project implementation of RSA-OAEP, I omitted support for labels at the beginning. I set the label to empty string on encryption and ignored the label on decryption. Now I'm adding a special function to set and test the label, but it's not constant-time yet. The security note in PKCS#1v2.2 says that the ...
Let's suppose someone creates a block cipher with 8192-bytes of the block size (65536-bits) or maybe 16384-bytes of the block size (131072-bits). What would be its disadvantages over a block cipher with smaller block sizes like 128 or 256-bits?
I have a RS256 JWT, I'd like to find out its public key. Because I know the header, payload and I have the encrypted signature, is there a way to obtain the public key that made the signature from these elements?
I believe this question should be directed to the authors of Kalyna block cipher, but I think they cannot answer me because of the war they are facing in their country actually. I know that AES uses this criteria for adjusting the rounds in accord to different key sizes: [key size]/32+6 Kalyna block cipher has 10 round...
I am finding the post-processing method to improve the randomness of the True Random Number Generator. Especially, TRNG can pass the NIST SP 800-22 after applying the post-processing. I tried to apply the Enocoro-128_v2 Pseudo-Random Number Generator as a post-processing method for TRNG. TRNG will supply the seed for E...
The screenshot from a book with Chaum–Pedersen Protocol description is below. I'm trying to implement it for my own. And I don't get math here. My assumptions: Discrete Logarythm functions: The dot in the formula below is a usual multiplication: 2 • 2 = 4 Examples:
Assume $g$ is generator of multiplicative group modulo prime $p=2q+1$ where $q$ is prime. Assume we know $g^{2t}\bmod p$ and $g^{2}\bmod p$ and assume we can have access to a Diffie-Hellman oracle. Can we find $g^t\bmod p$ in polynomial time? Note if we can do that we can break discrete log with access to a DH oracle...
The paper Breaking Symmetric Cryptosystems using Quantum Period Finding shows how to break the Even-Mansour Cipher using Simon's algorithm. The Even-Mansour uses two keys $k_1, k_2$ and a random public permutation $P$ to encrypt a message $x$: $$E_{k_1, k_2}(x) = P(x \oplus k_1) \oplus k_2$$ In a quantum known plaintex...
I'm learning the rainbow table and hellman table and I'm curious about the difference between them, so I left a question like this. Wikipedia describes the following sentence: The term, "Rainbow Tables," was first used in Oechslin's initial paper. The term refers to the way different reduction functions are used to in...
Kaweichel is a port of Blowfish for 64-bit architectures, its key size accepted is 1920-bytes, instead of 16 rounds it has 32 rounds, the double of Blowfish. ICE is a feistel block cipher that has a variant called ICE-n that accepts any key size being a multiple of 64, for this variant the number of rounds should be mu...
Let's say client side has a secret password $\pi$. The server has a series of indices $0..n-1$ and a salt associated value $s_i$ for all $i \in \{0,n-1\}$ call it set $S=\{s_i | i \in \{0,n-1\}\}$ for each client. Client wishes to compute an OPRF function $f(\pi,s)$ such that he does not learn $s$ and the server does ...
I want to use symmetric encryption to create a digital signature. What can be the possible scenarios where symmetric encryption is used to create digital signatures?
Background In the paper "Minimizing Embedding Impact in Steganography using Trellis-Coded Quantization" and in this question on this forum, a so called Syndrome Trellis is built from a parity check matrix. The figure below shows the example from the paper, where the trellis on the right is built from matrix $\hat{\math...
My implementation requires me to generate randomly a valid scalar on the curve. As far as I understand it is not a random number generation but more complicated thing. I have to generate such scalars on the server and the client side according following scheme: Client: X = x × G + w0 × M where x - generated scalar! G...
I would like to know if sub-public keys of PGP keys can be published separately, if I create a pair of master keys and multiple sub keys to be used in multiple emails, and normally use only the sub keys to encrypt, decrypt and sign. But then won't it be discovered by others that these emails are actually one person? I'...
I'm getting mixed reports on this one. I have a web host and multiple SSL scanning tools (including the one run by Qualsys SSL Labs), saying that the cipher suite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 is NOT vulnerable to Zombie POODLE/GOLDENDOODLE, and at the same time I have a PCI compliance firm indicating that it i...
I was reading this paper. And on Page 2 the following claim was made: Consider a public-key encryption scheme with a deterministic encryption algorithm, and suppose that the set of valid public-keys is in coNP. Then if retrieving the plaintext from the (ciphertext, public-key) pair is NP-Hard then NP = coNP. I guess wh...
There is an efficient variant of the RSA using the CRT: \begin{align*} d_p &= d \pmod{p-1}\\ d_q &= d \pmod{p-1} \\ q_{\operatorname{inv}} &= q^{-1} \pmod{p} \end{align*} where the decryption is done as follows: \begin{align*} c_p &= c \pmod{p} \\ c_q &= c \pmod{q} \\ m_p &= c_p^{d_p} \pmod{p} \\ m_q &= c_q^{d_q} \pmod...
The paper on the "SNEIKEN and SNEIKHA" AE and HASH sponge-based algorithms, respectively, presents a 512-bit permutation function "SNEIK512" that, unlike other permutations (ie: Keccak-f1600, gimli, etc.) takes a domain parameter. Their AE and HASH algorithms use this parameter to establish domain separation. All othe...
I'm part of a team of students from the Vienna University of Economics, which have the task to find application fields for a new technology. The technology itself is provided by an external partner, so I do not possess a lot of technical knowledge about it. As far as I understand, it is an encryption method that is abl...
I want to start off by being very clear: I'm not designing a system around this, this is 100% a hypothetical I was toying with. Is there any harm in using the cryptographic hash of a plaintext as the key? For instance, if my message was Hello, world!, that produces the SHA256 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c...
Consider a variable one-time pad, that is, $\mathcal{M}:=\{0,1\}^{\leq \ell}$ is the set of plain text. Now, this scheme is not perfectly secret, since you can take two plain text of different size, say $|m_1| = 1, |m_2| = 2$ and considering a cipher text $c$ of length 1, the next happens: $$Pr(E(k, m_1) = c) = \frac{1...
I intend to design a model to comply with RFC4880. According to RFC6637, ECC in OpenPGP +ECDSA to sign message +ECDH + KeyWrap for session key encryption -MAC: is used for key confirmation (with C(1e, 1s) Scheme at https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf) -MDC: is Modification Detect...
This weekend I participated in a CTF, but came across a task that I wasn't able to solve. I can't find any write-ups so I hope you can help me. Given: $$ n = pq\\ c_1\cong m_1^{\hspace{.3em}p} \mod n\\ c_2\cong m_2^{\hspace{.3em}q} \mod n $$ Knowing the values of $c_1,c_2,n$ and that $p$ is 1024 bit and $q$ is 1000 bit...
The curve I am using is secp256r1. Its formulae is $y^2 == x^3 + a\cdot x + b$ $a$ = 0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc (115792089210356248762697446949407573530086143415290314195533631308867097853948) $b$ = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b (4105836372515...
I read in this paper that keeping the S-boxes secret in AES raise its security from 128-256-bits to 1812-1940-bits. Let's suppose I use one different S-Boxes set per single round. /\ Does this increases security even more than using only the same S-boxes set in entire cipher?
I know that if only one character is encrypted using a shift cipher, then the shift cipher is perfectly secure. But what if the space of keys is greater than the space of messages? Would it still be perfectly secure? I think it would still be a yes, but I don't know how to deal with unused keys. The theorem 2.10 (Intro...
as the title says, for example, A uses B's public key to encrypt a message and sent it to B. In later stages, a new member C joins and B would like to let C be able to see this encrypted message (i.e., give the decryption ability to C). How to achieve this without letting A encrypt the message again using C's public ke...
I'm trying to solve a CTF problem relating to RSA encryption. I can run a challenge binary that will read a flag from a file, the flag will match the following RegEx: AB1234C\{[0-9a-f]{32}\}\n So in total the flag is 42 bytes including the newline The flag is then padded with random padding to a total of 128 bytes. I c...
RFC 8446 limits the maximum data carried withing single TLSv1.3 message to $2^{14}$ bytes, specifically in section 5.1: The record layer fragments information blocks into TLSPlaintext records carrying data in chunks of 2^14 bytes or less. The length field in the TLS header is represented by 16 bits so the maximum len...
I have the following Diffie-Hellman ciphers on one of my servers TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 TLS_DHE_DSS_WITH_AES_256_CBC_SHA TLS_DHE_DSS_WITH_AES_128_CBC_SHA TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA I have been asked to disable any and al Diffie-Hellman moduli of less than 2048 bits I've managed ...
As far as I know, JPG is a lossy image compression format Meanwhile, BMP is a generally uncompressed image format, whose file structure consists of bitmapFileHeader (14 bytes) and bitmapInfoHeader (40 bytes), the rest of which is pixel data. So I just need to pass the first 54 bytes and store it as a HEADER variable, a...
Hey i do have a question about cryptography: I know that Elliptic curve is cryptography algorithm and Diffie–Hellman is mechanism which is provide the two parties who wish to encrypt some data with a identical key (symmetric key) and elliptic curve algorithm is used in conjunction with DH to provide authentication. I a...
Assume AES in XEX mode, so we encrypt a plaintext $x$ as $E_K[x \oplus k_1] \oplus k_2$ where $E_K$ is the usual AES Block cipher (assume $x$ is of block size). Assume the implementation of AES is vulnerable to cache-side channel attacks. Have any attacks against this XEX mode of AES been demonstrated? It seems to me q...
I've been doing some reading on hash based signature schemes, specifically XMSS and thus the underlying Winternitz scheme (WOTS+ to be precise). As their names suggests, WOTS and WOTS+ are one time schemes, so signing multiple messages with the same key should leak some info. I have however not been able to come up wit...
I came up with a rather simple FHE scheme that shouldn't work, but I can't figure out how it breaks. Any help with this is appreciated! Part one First, note that if we had an abelian field where computing the multiplicative inverse was difficult, then we could construct a homomorphic scheme for addition and multiplicat...
Is there any indistinguishability proof (e.g., IND-CPA, IND-CCA, IND-CCA1, IND-CCA2, IND-CKA) based on games that involve breaking the AES security? Usually the proof involve breaking hard problems like DL, CDH, DDH, BDH.
Given a EC with cardinality $C=P^3+c$ with $P$ a prime $P \approx \sqrt[3]{C}$ and $c>0$. Out of a given generator $G$ we generate two additional generator $F,H$ with $$F = P \cdot G$$ $$H = P^2 \cdot G$$ (all would still generate a sequence of length $P^3+c$) Given now a random member $M_1$ of that EC we can generate ...
Given $n$-bit block cipher $E$ (and its inverse $E^{-1}$), define block cipher $E^\prime_k(m) = E_k(E_{f(k)}^{-1}(m))$ where $k,f(k) \in \{0,1\}^n$ and $\forall k:f(k) \ne k$. Under the ideal block cipher model, there exists no function $f$ which would give an attacker an advantage against $E^\prime$. Are there any rea...
In substitution–permutation network block ciphers like AES, when encrypting a plaintext into a ciphertext, will each bit of the ciphertext be associated to each bit of the S-boxes set in the cipher? I have seen the Kuznyechik reference implementation and I have doubts if each bit of the ciphertext will be associated wi...
Depending on $\alpha,N,x$ the sequence $x\mapsto x^\alpha \mod N$ can have a different length. If the first element $x_0$ is initialized with $x_0 = x_r^\alpha$ for a random $x_r$ the sequence will almost always have the same constant size. We will focus here only at the most common sequences with max size $N_L$ (for g...
I am having an idea to create a cryptographic hashing algorithm. I found a mathematical function $f: x \rightarrow y$ . By using Merkle-Damgård construction wide pipe, I designed a hashing function. Now I have some problems to solve before writing a research paper. How to find if my hash is strong or not? How to find ...
I'm looking for / working on an algorithm that must be very small and simple, with no extra libraries and stuff that looks suspicious to a user using the code. You can see what I mean by reading the below. The user just keeps the dead simple code that he can even understand, and remembers his passcode, and the files ar...
relic, the library used by the majority of BLS implementations, is rather difficult to build cross-platform. Because of this, I've been looking for other pure BLS implementations that don't rely on C - and I've found one in Go and another in Rust. However, the nomenclature seems to be different between each library. I ...
Is there any existing approach to construct perfect hash function that map [0, M) to [0, M)? It should be one to one mapping and one-way. f(value, salt) -> hashed_value
I am looking to see if using a digital signature is a secure and reasonable way to generate a key for AES encryption. To flow would be as follows: A user signs a message m with their private key. They actually sign the hash of m but this is taken care of as part of the digital signature creation function. This returns ...
I'd like to derive two independent 256 bit keys for symmetric encryption from a user password. I'm using Argon2id as the password-based key derivation function. I'm planning to do the following: Generate a 256 bit random salt. Generate a 512 bit tag with Argon2id using the user's password and the salt. Take the first ...
I have a C# solution that encrypts a bunch of small data chunks using AES. //This is how I'm configuring the Aes object var aes = Aes.Create(); aes.Mode = CipherMode.CBC; aes.KeySize = 256; aes.Padding = PaddingMode.PKCS7; I then write the raw ciphertext bytes to SQL Server VARB...
Semantic Security may be defined using the distinguishability experiment/game, which we recall as follows: Let $(E,D)$ be an encryption scheme. After the challenger chooses a security parameter $n$ and random key $k$, the (semantic security) adversary choosing two messages $m_0, m_1$ that depend on $n$. The challenger ...
I am trying to understand this article. Can someone explain to me how the ECDSA adaptor signing is work? From the article: 1. ECDSA adaptor signing $$s' = (H(m) + R t p)r^{-1}$$ As I understand this is standard formula where $x = t p$ - is a private key for the signature s'. So public key is $P = t p G$ 2. Decryption E...
From the NIST SP 800-90B, we can use these cryptographic algorithms (HMAC, AES, Hash function) as a post-processing technique for TRNG. Besides that, can we apply the Pseudo Random Number (PRNG) as a post-processing method for True Random Number (TRNG)? It will become the Hybrid random number generator (Combination of...
Why is the discrete logarithm problem assumed to be hard? Someone else asked the same question but the answers only explain that exponentiation is in $O(\log(n))$ while the fastest known algorithms to compute discrete logarithms is in $O(n)$. (I'm glossing over details like the runtime of index calculus here.) Somewher...
I am here so if I asked something wrong or in the wrong way please let me know. How to hash compression large data into the fixed size of the string. Edit: How Davies–Meyer does work? Take the example of input as: "Hello this is a demo"
If I want to prove that an encryption algorithm is CPA secure (or that it isn't), then how much am I allowed to assume the attacker to know about the internal workings of the algorithm? Do I need to assume that the encryption algorithm is just a "black box" from the point of view of the attacker i.e. they can only quer...
Reading Why Zk-SNARKs are Argument of Knowledge if a Knowledge Extractor exists? I feel confused by OP first statement: From what I know, proving the existance of a Knowledge Extractor implies perfect soundness. Answer focuses on soundness not necessarily being perfect, but it seems implicitly confirming the soundnes...
Can we make EC ElGamal have multiplicative homomorphic property?
I have taken this implementation of RC4 written in C. I have 40-bit key and 32-bit IV (both in hex). So, questions is about KSA step: How should I transform hex key value into the char array? Just convert it to long? Where should I introduce IV? (Some write to concat it with the key, others write that S is already IV...
In NIST SP 800-90C, it said:"Small deviations in the behavior of the entropy source in an NRBG will be masked by the DRBG output" Why the DRBG can mask the small deviations in the behavior of the entropy source? Can anyone give the mathematical or reference?
how to encrypt using play fair if "i , j" both are in the plaintext? for example Beijing.
Consider a formulation of LWE where we are given either $(x,S x+e)$ or $(x,u)$ --- where $S$ is an $m \times n$ secret/hidden matrix, $x$ is a randomly sampled $n \times 1$ vector, $e$ is an $m \times 1$ Gaussian error vector, and $u$ is a uniformly random sample --- and told to distinguish between these two cases. Thi...
I am trying to learn attack on hash collision. I guess for this scheme, it might be possible to use messages with different lengths to find a pair of same ciphertexts. An attempt is to use the same first block, and let M1 = M[1] and M2 = M[1]M[2]. Then, it might be possible to find a collision because the first one ou...
I am using a system that relies on base64 encoded ECDSA public keys. I have managed to brute-force a public key that when encoded starts with a word I like. Is it possible for me, given the private key, generate similar public keys?
Consider the following protocol from the book "Network Security: Private Communication in a Public World" by Kaufman et al. Alice knows a password. Bob, a server that will authenticate Alice, stores a hash of Alice’s password. Alice types her password (say fiddlesticks) to her workstation. The following exchange takes...
In Curve25519 we typically have this generator point or base point: Gx = 9 Gy = 14781619447589544791020593568409986887264606134616475288964881837755586237401 or: Gy' = p - Gy = 43114425171068552920764898935933967039370386198203806730763910166200978582548 Where p = 2^255-19, the dimension of the prime field Fp in w...
This is a question sparked purely by curiosity, wanting to understand a little more about cryptography and authentication. Thanks in advance to anybody taking their time to answer. Instead of salting and hashing a password, sending it to the server to authenticate yourself, could something like this work? A client gene...
Here is a possible way to perform iterative cryptographic hashing twice as fast as in the ordinary way. Given a compression function $f: \{0,1\}^{a+b} \rightarrow \{0,1\}^b$. Assume the message is of length $4a$ bits after padding. Normally the four message blocks are injected one after another into a data block $x_i \...
Assume that the verifier is given three commitments $C_i=g^{m_i}h^{r_i}, i=1,2,3$. Now a prover knowing $m_i, r_i, i=1,2,3$ wants to prove $m_3\neq m_1\wedge m_3\neq m_2$. Specifically, the relation is follows: $\{(m_i,r_i), i=1,2,3|C_i=g^{m_i}h^{r_i}\wedge m_3\neq m_1\wedge m_3\neq m_2)\}$. A general relation can be w...
Let $R$ be the ring of integers of a cyclotomic field $\mathbb{Q}(\zeta_n)$, where $n$ is a power of two, and $\boldsymbol{a} \in R_{q}^{m}$, for $m\in\mathbb{Z}^+$, $q\in\mathbb{Z}_{\geq2}$ prime. Define the following $R$-modules, where $I$ is an ideal of $R_{q} = R/qR$: $$ \begin{gathered} \boldsymbol{a}^{\perp}(I):=...
Is there any protocol for remote secret key storage without disclosure the key value for remote server administrator?
I'm reading up on elliptic curves and their history and it seems that people don't trust P256 seed which is defined in FIPS 186-3 on page 89 to be SEED = c49d3608 86e70493 6a6678e1 139d26b7 819f7e90 Which people suspect may have been generated maliciously. I'm wondering what happens if the seed is picked in a way that ...
In Ring Learning with Errors problem, the size of the ciphertext quotient $q$ decides the size of the polynomial degree $n$ or vice versa. In other words, rlwe problem is hard only when the polynomial degree is set in comparison to the quotient. However, I am not sure what is the relationship between the values of the ...
I have the need to take a string and return a color. One requirement is that the same name always returns the same color. Another is that similar names should not return similar colors. I understand that a property of cryptographic hash functions is that small changes to the input result in large changes to the output ...
Blowfish splits a 32-bit word into 4 sets of 8-bits (1 byte) and use them as entries in its S-Boxes. Kuznyechick splits two 64-bits words in many nibbles (4-bits chunks), use them as entries in its S-Boxes and XOR each modified nibble with the next nibble in their sequence. Kalyna does the same as Kuznyechik but it use...
Most cryptographers know the scytale. It is that cipher where you roll a leather strip around a rod and then write text on it. For encryption you roll it off the stick and for decryption you roll it back on the stick. It can be visualized like that (from Wikipedia): | | | | | | | | I | a | m | h | u | ...
Sorry if question is really dumb, I am new to crypto :( If the client provides the solution for the PoW Challenge-Response, in my understanding, the solution of that challenge should be verified. So I don't understand, if the verification process is involved in Challenge-Response, what's the difference between them? If...
What is the likelihood of getting the same result from /dev/random?
I see there are a lot of questions relating to handling of a salt value but nothing I have seen so far has cleared the following question. When using a KDF such a scrypt, I believe the value of the salt should be random and change each time even on a per user basis (same user generating two different keys at different ...
Has anyone integrated OpenSSL with the ETSI QKD key request protocol? I want to make my most critical SSH sessions quantum-safe by integrating with a QKD system and it appears the QKD vendors use the following API specification for the two side (Alice and Bob) to request keys: https://www.etsi.org/deliver/etsi_gs/QKD/0...
Many types of encryption can be generalized as using a message $m$ and a key $k$ as input of an encryption function $f$ with a cipher $c$ as output. $$f(m,k)=c$$ As a node graph this could look like this: Given node $m$ it has one edge of progression. If an inverse function $f{^{-1}}$ exists we could use it as a 2nd e...
I learned that in Substitution–permutation block ciphers, the maximum size of S-Box set to receive an entry from a data is the max numeric count of the data, for example, if the entry is 8-bits the S-Box set to be used is 256-bytes as 2^8=256. Would 16-bits entries in a S-Box set of 65536-bytes (2^16) deliver the same ...
I am a bit unsure about CMAC and GMAC and maybe someone can help me. As far as I know, CMAC does not use an IV [SP 800-38B ch. 6.2]. Is it then secure if I use the same key for different messages? ...and why do I need an IV for GMAC? What happens here if I reuse the IV and the same key? In my case I don't encrypt any m...
I heard there is a possibility to perform a brute force attack of an password, I know there is an option to use graphic cards on AWS, but is there a solution for Azure too? Which costs would it take to perform such an attack? I know it depends on the performance, time etc., is there some pricing list on how Azure solve...
Hopefully this question is not duplicative, nor its answer too elementary. Suppose I have a file. I encrypt it, using a password. The password presumably stipulates a pattern or relationship between the file in its pre-encryption (A1) and post-encryption (B1) forms. But that pattern or relationship is indeterminate. De...
ciphertext1 = hmac-sha256(key, counter1) ⊕ (plaintext1 with plaintext1 sha1 hash) ciphertext2 = hmac-sha256(key, counter2) ⊕ (plaintext2 with plaintext2 sha1 hash) ciphertext3 = hmac-sha256(key ,counter3) ⊕ (plaintext3 with plaintext3 sha1 hash) . . . Note: counterN is increasing while (plaintextN with plaintextN sha1...
I am building a cryptographic El Gamal implementation on the Cardano Blockchain for a poker game. Each hand the players generate a DH 64 bit keys and shuffle the cards together via homomorphic encryption and some non interactive zero knowledge proof. Now due to the limits of the size of a transaction the safe primes fo...
A limitation digital signatures is that for a given signature σ of a message m corresponding to a public key pk, an adversary could generate a pk', sk' that produces a signature σ' for m, such that σ' = σ. How can we create a signing function and verification function that is resistant to this attack?
I'm trying to prove that the following two definitions are equivalent: $\forall m\in M $ and $c\in C$ $\Pr[C=c \mid M=m]=\Pr[C=c]$ $\forall m_1,m_2 \in M $, $E_k(m_1)=E_k(m_2)$, where $E_k(m_i)$ stands for the distribution over $k$ of the encrypted message $m_i$. First - just to make sure, I am indeed supposed to s...
I'm a complete noob. I was reading up on hash functions. So if a bank has its user password's run through a hash function, it'll produce a unique hash for every password right? Thus, even if hackers are able to get their hands on some data, they'll only have the hashes and not the original passwords. But I also read th...
I'm following a course that speaks about cryptography. In this course we talked about Min-Entropy ($H_{\infty}$) and Extractor. To show that an extractor $Ext:\{0,1\}^n \rightarrow \{0,1\}^l$ that outputs an uniformly random string doesn't exist if $H_{\infty} < n$ we take the special case $\ell=1$. But I don't well un...
According to the literature (https://en.wikipedia.org/wiki/Garbled_circuit), Oblivious Transfer allows a party A holding a function $f$ and a party B holding a index i to jointly compute the value $f(i)$ while keeping the privacy of $f$ and $i$. In my opinions, OT is enough for archiving the cryptographic functionality...