instruction
stringlengths
32
27.2k
I designed this pseudo-random function algorithm that takes a uint64 and returns a uint64. I'd like to know if it is any good and if so, if it is original? If not original, who came up with it first? First you start with 65 constant random uint64s. Lets call them $P_0$ thru $P_{64}$ For an input uint64 X you XOR toge...
What is reset indifferentiability? Why practical hash functions cannot satisfy reset indifferentiability. What are the implication of reset indifferentiability.
According to this page, Curve25519 and Ed25519 are not isomorphic, because the birational equivalence equation has singularities: What does "birational equivalence" mean in a cryptographic context? But... Curve25519 and Ed25519 are both cyclic groups, right? Both have order of $2^3 * (2^{252}+277423177773723535358519...
I'm trying to implement own DSA signature check as per guide at this site page 20 in python. kp = 0x8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac49693dfbf83724c2ec0736ee31c80291 kq = 0xc773218c737ec8ee993b4f2ded30f48edace915f kg = 0x626d027839ea0a13413163a55b4cb500299d...
Out of $N = s^3$ total points we pick a starting point $p$ and an end point $q$ with $$p=(p_1, p_2)$$ $$q=(q_1,q_2)$$ $$p_1,q_1 \in [0,s)$$ $$p_2,q_2 \in [0,s^2)$$ We want to find a path in between them. For doing so we have two kinds of progression: A trivial one by just walking forward: $$f((e_1,e_2)) = ((e_1+1 \bmo...
I am trying to understand a request I reverse engineered which is sent to a Daly BMS over BLE. Those requests change the 'sleep after' in seconds of the BMS: For DDDD seconds: d2 06 00 8A DD DD 22 8A For FFFF seconds: d2 06 00 8A FF FF BA 33 For EEEE seconds: d2 06 00 8A EE EE 76 6F For FFFE seconds: d2 06 00 8A FF FE...
I am working through Katz and Lindell, and Theorem 3.26 in the book proves that a construction based on a PRF is CPA-secure. The thrust of the scheme is that if $F_k$ is a PRF, with $k, m, r \in \{0, 1\}^n$ (key, message, random-string), then $c = (r, F_k(r) \oplus m)$. The idea behind the proof is to first prove the ...
Does HMAC take part in TLS/SSL? When the client and the server pass the TLS handshake and create a common SESSION key, do they also HMAC each message that is being sent out for the purpose of data integrity?
Suppose there are different users data for $n$ Smart meters. We encrypt all the individual data and then add them together. After decrypting the summation, how can we retrieve the original data? We are using pallier cryptography.
When I use the merkle proof example of libsnark, I find that it takes more time to calculate the merkle tree than to calculate the proof. As shown in the log below, it takes 0.04s to calculate a SHA256. When the depth of the tree is 20, it takes at least 3 hours to exac SHA256, but only 14s to exac proof. I notice that...
Is RSA-signing a given challenge $x$ a zero-knowledge proof of holding the RSA private key, for the modern definition of zero-knowledge proof (which I don't know!) Assume public and genuine RSA public key $(n,e)$, secret RSA private key $(n,e,d,p,q\ldots)$ with distinct secret primes $p$ and $q$, that the factorization...
While reading about the Davies-Meyer mode (and other modes), I have got some doubts: What can I use as the key to the encryption $E$? Since I am generating hash of a message (not MAC), then there should not be any secret key involved. What is the initial hash value ($H_0$)? Can I take it as some public value (IV/nonce...
Reading the wikipedia entry on asymmetric cryptography, will I be wrong to conclude that there are 3 main broad category of application for asymmetric cryptography? Mainly: encryption digital signatures key exchanges Or are there other category of applications for asymmetric cryptography that do not fall under these ...
For every $a \in \{0,1\}^n$ define: $$h_a : \{0,1\}^n\to \{0,1\}$$ $$ h_a(b)=\langle a,b \rangle$$ So $\{h_a\}_{a \in \{0,1\}^n}$ is known to be a universal hash function family. This means that if we denote this family by $\mathbb{H}$, and the random uniform distribution over this family by $H$ then for any $k$-source...
If the inputs for a garbled circuit are from multiple parties, can parties (not garbler, not evaluator) obtain the labels corresponding to its input from the garbler via oblivious transfer then send the labels to the evaluator? Will this have any security issue?
From what I understand, to reduce the time taken for public key generation, you can use nested trees in XMSS to form Multi-tree XMSS. For an instantion of 2 layers, it seems that the leaf of each L tree (one of these nested trees) is an OTS public key. This means that the leaves of the top level tree sign the OTS keys ...
I started wondering. RSA relies on prime factorisation being hard. So if a 2047-bit oracle machine existed that could instantly factor any 2047-bit number (and you can't look inside at how it works), would that in any way help in breaking 2048-bit RSA encryption? My insticts says no, but I can't be sure.
Given a $N$-bit AES or similar block cipher with his $N$-bit key $k$. We can encrypt a $N$-bit message $m$ to a $N$-bit cipher $c$ and decrypt it again. $$E(m,k) = c$$ $$D(c,k) = m$$ An adversary does know $n_m$ bits of the message, $n_c$ bits of the cipher and different to most applications also the full key $k$. He ...
I was reading this challenge, which proposes to clone (or recover) the internal state of the MT19937 just by applying the inverse process to each output (624 consecutively words). Mersenne Twister's FAQ also says: Mersenne Twister is not cryptographically secure. (MT is based on a linear recursion. Any pseudorandom nu...
Secure Equality Test is an important building block in Secure Multi-Party Computation (MPC) with respect to Secure Comparison, also known as Socialist millionaire problem. A similar question was posted several years ago (Extending the Socialist millionaire problem to three parties), but it seems to be considered from Z...
Can I safely use a signature as a private key for the purposes of encryption? let sig = sign("email", "originalSecretKey"); encrypt( "foobar@example.org", "someNonce", "theirPublicKey", sig // <--- Use signature as new private key? ); I'm looking for a way to "scope" the originalSecretKey. Let the user saf...
I understand that in the non-interactive linear form (page 15 of Groth16: https://eprint.iacr.org/2016/260.pdf), given $A$ and $B$ in the proof $(A,B,C)$, the simulator can compute the $C$ by: $C =\frac{AB-\alpha\beta-D}{\delta} $ where $D = \sum^{l}_{i=0} {a_i(\beta u_i(x) + \alpha v_i(x) + w_i(x))} $. However, I do...
I am a Ph.D. student studying CS theory, I made this account for this question. Recently, I seem to have obtained a proof of existence of a PRP (which is unconditional in the sense that it does not rely on unproven assumptions), but in order for it to work it does require a limitation of the running time of the adversa...
I understand by the birthday problem, the algorithm will expect to take $\mathcal{O}(\sqrt{N})$ times to find a cycle. However, one of the steps involves computing the $\gcd(\mid x-y \mid, N)$, which, I assume, uses the euclidean algorithm, which is $\mathcal{O}(\log(N))$. So shouldn't it run in $\mathcal{O}(\sqrt(N)...
Say, for an AES-GCM encryption, an attacker knows essentially everything except the key. This would include: Plaintext Ciphertext IV Algorithm (AES-GCM) In this case, will the attacker gain any advantage towards learning the key? The application: I am using Password-Based Encryption following PKCS #5 recommendations....
As a beginner in cryptography and zk-SNARKs, I am currently working through the paper "Why and How zk-SNARK Works". There, I don't understand the last section at the bottom of page 15: While in such protocol the prover’s agility is limited he still can use any other means to forge a proof without actually using the pr...
MRT is a probabilistic test and even the deterministic version relies on the correctness of the Riemann hypothesis. When the test fails and I use a non-prime number in e.g a public key encryption method: what is going to happen? Will my public key not work, will it be a little less secure or will it be completely insec...
I'm having trouble making an implementation of Enigma Machine in VBA. My question is about implementing the rotors and their move. To be more precise, I will show below the way that I code my Enigma Machine for the move of the rotors: Example : Rotor : I II III Initial value A A A Ring Rotor (set up rotors) : 1 1 1 ...
I’ve been implementing Hasty Pudding from its spec, but I can’t find a copy of the test data to validate my implementation against. The directory of tests links to various files in ftp://ftp.cs.arizona.edu/xkernel/rcs/hpc/test/, but that server no longer talks FTP, and I haven’t been able to find the files anywhere els...
I have defined the following commitment scheme and would like to prove that it is statistically hiding and computationally binding, but I'm not sure if my proof is accurate: For $h$, a collision resistant hash function, I defined the following scheme: $C(b, 1^n)$: $r \leftarrow U_n$ // random uniform string of length $...
As I know, the best attack on single or double Even-Mansour scheme is N/2, being N the key size (or size of one of the two keys used). I know that encrypting two times using this scheme is susceptible to Meet-in-the middle attacks, but if encrypting three or more times, what security in bit I will get for each layer ad...
I have been searching for resources on the internet about the efficiency of Encrypt then MAC, MAC then encrypt, MAC and encrypt, and hash then encrypt and I have come up short with all of them. Most sources will give what they will protect against but none will tell me what is more efficient in time and resource wise.
Given that CBC mode has a padding oracle attack, would disabling the padding integrity check be a good way of overcoming the vulnerability (this may result in frustration among existing users with regard to troubleshooting initial vector mismatches, but this will at least not render the mode itself vulnerable)?
In my database, I have a PBKDF2 hash + salt for every user. My objective is for the user to be able to log in without stating the user's password (in case somebody is logging the network traffic somehow). I was wondering if the following scheme is secure, or if there are any fallacies. Client starts the login process ...
Encrypting values with AES we only need about $2^{64}$ trials until we finding an already used value (some collision). This can be done these days with easy. To make this harder can we combine two AES to a block cipher $BC_{192}$ with $192$bit in- and output? E.g. Given $AES_1$ with $k_1$ and $AES_2$ with key $k_2$ (bo...
With the term GPU programming, I'm referring to highly parallelizable computing in general. Lastly, I have built a bit of a background in cryptography. So I have started to wonder if/where GPU programming is applicable for cryptographic use. I am thinking that in most use cases it will offer little to no advantage beca...
This should be pretty simple question I presume. So let's say I have an 8x8 S-Box. I can easily treat it as 8 different boolean functions for each of the 8 input bits. Is the non-linearity the lowest linearity of each boolean function? Or is there something else that needs to considered with an S-Box? If it is differen...
Is OK to derive a key using HKDF (Extract & expand) with a shorter size than the digest size of the configured hash function? In that case the result is computed (on the expand part) by truncating HMAC(PRK, "" | info | 0x01) . If it is not OK, then I am thinking on using a hash function that has a shorter size in order...
I'm trying to implement impossible differential cryptanalysis on IDEA cipher based on the Miss in the middle attack on IDEA and Khufu paper. I'm trying to implement the attack on 3.5-Round IDEA and I stummpled with the initial pair generation step because they suggest generating $2^{32}$ pairs, which would normally be ...
I want to identify hash algorithms without names (like sha256, ). Is there a problem in make sha256('') and use the output like the id? An empty string is really an empty input or this input is no really unique? Thanks!
I have a long list of items with non-random id numbers. I then compute the hashes of the ids (using SHA256 or something similar). If I now pick all ids where, say, the last digit of the hash is a 3, is that equivalent to a random sample? I know that looking at the hash I can't infer if the id number was odd or even. Do...
I refer to Should we MAC-then-encrypt or encrypt-then-MAC?. There are 15 answers (today) with many words. It is difficult to tell which is the correct(?) answer. Also, the question excludes the concept of informationally secure universal hashing, or the effects of the application of a one time pad to the (H)MAC. The or...
I am considering the following problem related to Learning with Errors. Recall that the LWE assumption is that no adversary can distinguish $(A,As+e)$ from $(A,u)$ with non-negligible advantage, where $A\in\mathbb Z_q^{m\times n}$ and $u\in\mathbb Z_q^m$ are random and $e\in\mathbb Z_q^m$ is a random vector each elemen...
I want to read this kind of diagram, but I haven't found the name of this, or somewhere I can find a legend of symbols used, or a tutorial to learn reading this... I've googled this for over an hour, with similar images. Nothing :/
Suppose I want to send a message, but not privately; I want everybody to see it, even an attacker in the middle. I would do this by appending a public key to the start of the data, which could be used to decrypt an HMAC attachment, and verify that I sent it. Is this feasible? Would this still ensure the integrity of th...
Is there an encryption algorithm or MAC algorithm for which NO zero-knowledge-proof exists, provably? I want people who want to prove that a ciphertext decrypts into some plaintext to have to spoil the key for decryption, or if they want to prove that message's MAC is some given MAC then they have to spoil the key for ...
I'm trying to perform a hash update with updated parameters using argon2. According to Argon spec v3 (2.2.3 Client-indepentend Update, p. 9) the client independent update is executed as follows: $$ Tag_{new} = \Pi(Tag_{old},S,m_{new},R_{new},\tau_{new}) $$ I'm assuming $\Pi$ to be our hash fn Argon2i/Argon2d (as used i...
I want to use DCR-based functional encryption for encryption and decryption purpose. However, I'm unsure whether DCR-based functional encryption can support negative integers. Is there any implementation or construction of functional encryption where negative integers are encrypted/decrypted?
What the benefit of the shared key that generated from ECDH key exchange protocol? Can I use it to encrypt the message or encrypt the public key of asymmetric encryption?
In the practical application of secure multi-party computation, the operation of division is inevitable. But I don't know how to construct a division? In order to make the problem more accurate and easy to understand and answer, the following three mainstream paths are used to directly benchmark specific algorithms to ...
Given the following curve: $$ y^3 = x^2 - 7x $$ over the finite field $GF(271)$. We have $P = (201, 247)$ belongs to the curve: $$ 247^2 \equiv 201^3 - 7 \cdot 201 \equiv 34 \mod 271 $$ We also have $Q = (201, 24)$ belongs to the curve: $$ 24^2 \equiv 201^3 - 7 \cdot 201 \equiv 34 \mod 271 $$ So, how to add $R = P+Q$ ?...
Suppose you take the aes_sub_bytes function intended to operate on 4 aes blocks which were bitsliced to 8 u64's but you omit the bitslicing step beforehand. As a result you apply the sbox to the incorrect bits. But nevertheless the sbox is applied to all bits. Do the security properties of AES change at all? You are no...
Over a decade ago, a question was asked on Stack Overflow, which basically asked if there were any encryption schemes that are reducible to an NP-complete problem, in the sense that breaking the encryption implies breaking the underlying NP-complete problem, and hence proving $P\not=NP$. As a concrete example, is there...
My understanding is that for PAKE protocols such as OPAQUE (https://eprint.iacr.org/2018/163.pdf), the the adversary has no choice but to just do online attacks on the password. If this is true, I have 2 questions (which hopefully can be answered with references to RFC, NIST, etc.): What is a reasonable entropy level ...
I am reading this page on wikipedia on Key derivation function here where it states: In cryptography, a key derivation function (KDF) is a cryptographic algorithm that derives one or more secret keys from a secret value such as a main key, a password, or a passphrase using a pseudorandom function (which typically uses...
I have a scheme where a key and a data blob are provided that I need to decrypt. I do not know if the key provided is correct and I want to throw an error in my system if the wrong key is used. I get no other information other than the key and the blob, so I want to put a magic string (8 bytes) at the beginning of the ...
From Deterministic wallet: A deterministic wallet is a system of deriving keys from a single starting point known as a seed. From KDF from Wikipedia: In cryptography, a key derivation function (KDF) is a cryptographic algorithm that derives one or more secret keys from a secret value such as a main key, a password, ...
Following this page https://en.bitcoin.it/wiki/Secp256k1, secp256k1 curve's equation is $$y^2=x^3+7$$ Does this mean that I can substitute $G_x$ in the equation to get $G_y$? I think yes and that's how public key compression works, since we don't actually need to store $y$ value because we can compute it at run-time. B...
So I'm trying to compare different digital signatures, and thus I stumbled upon a DSA algorithm. I'm using python's cryptography library, and it offers following values for L and N: L=1024,N=160 L=2048,N=256 L=3072,N=256 L=4096,N=256 I'm wondering what are security levels of those pairs. I found this table from NIST ...
Suppose we have A and B, e.g. a user a server, where A encrypts data to be processed by B homomorphically. It seems that we could construct a pseudo-fully homomorphic encryption system---prior to Gentry's FHE scheme---where: B processes encrypted data using additive (or multiplicative) PHE, then sends the encrypted re...
So I'm trying to decrypt AES encryption with a 32-byte key. I know the first 7 bytes, and the final 19. I also have the plain text, as well as the IV and the encrypted text. I'm currently running python code to try the combinations (for now I'm trying all the combinations of lower case letters), but I was wondering if ...
I've got a comma-delimited list of identifiers that I need to use for uniqueness. MSSQL limits uniqueness to 1700 bytes, which according to my sampling, doesn't appear to be sufficient. hashes are the obvious solution. the identifiers are completely meaningless... they're lookups to locations of data... so there is NOT...
I am trying to combine the effect the shift row and mix column into a single matrix. The cipher that I am working with is skinny64 (untweaked version). I know that combining the effect of these two matrices would generate a binary 64*64 matrix but I can't seem to figure out on how this such a matrix could be constructe...
ElGamal cryptosystem provides multiplicative homomorphic property which can also be converted to additive homomorphic property. Can we use both properties simultaneously? For example, we want to achieve sum and product both simultaneously: E(a_1+a_2,...,a_n) * E(b_1+b_2,...,b_n), for instance, this could be achieved by...
I've been reading about Learning with Errors here. On p. 7 there's a proof for the security of the PKE scheme, that goes through the leftover hash lemma, in order to prove that: $$ (pk, Enc(0))\equiv (pk, Enc(1)) $$ (Hybrid 2 and 3 there, for example). I don't understand why we need that transition at all. Why can't we...
Instead of sampling $\mathbf{s},\mathbf{u} \gets \chi$, we will sample $\mathbf{s},\mathbf{u}$ from $R_2$, i.e. the norm $||\mathbf{s}||=||\mathbf{u}|| = 1$. $\cdots$. The security implications of this optimisation seem to be minor, at least when we make the assumption that the results for the LWE setting carry over t...
In Pinocchio paper, I'm confused by the equation in section 2.2.1. (image below) Is the product of two polynomials $v_0(x)+\sum(cv(x))$ and $w_0(x)+\sum(c_w(x))$ of dot product or just a simple multiplication? What I mean by the dot product of two polynomials is the multiplication of same-degree terms in each polynomi...
AES-128 takes a 128-bit key (four 32-bit words), and expands it to a 352-bit key schedule (11 words). Speck48/72 takes a 72-bit key (three 24-bit words), and expands it to a 528-bit key schedule (22 words). Key expansion is an extremely popular practice, but I can’t figure out why. Why not instead use a longer key with...
I am refering to Privacy Aware Incentive Mechanism to Collect Mobile Data While Preventing Duplication https://ieeexplore.ieee.org/document/7357616. They claim to split secret $X$ into $X_s=\{x_0,\dots, x_n\}$ under a (2,n)-secret sharing scheme based on shamir's scheme, and compute $x_k'=\{x_k/X\}_{0\leq k\leq n}$ (in...
I have a DER-serialized private key. The tool I have to provide the key to gives me algid parse error, not a sequence, and it looks like the problem is that the key is not PKCS#8. The command that the most popular comment to the answer suggests, worked for me - I got a PKCS#8 key and the tool accepts it. Now I am curio...
It is known that by adding an extra round of communication, it is possible to convert a random OT (where the choice bits and the sender input are random) to a standard OT, see https://crypto.stackexchange.com/a/84206/48273 for details. OLE (oblivious linear function evaluation) is a generalization of OT. Specifically, ...
I am developing an application in which all application state is entirely public. Each user of the application is equipped with their own ed22519 keypair, and the application can only ask users for signatures of arbitrary data. I would like to store some private data for each user in the public application state. The p...
As the question puts it: is there a test that can be done or a software that can be used, that is able to provide numbers/data to prove how secure a password hashing is? Say for example that I want to compare the security between using "phpass' portable hashes" and hashes made from "PBKDF2 using SHA3-512 as the HMAC" o...
Given a polynomial-time adversary $A$ with binary output, the distinguishing advantage of $A$ with respect two games $G, H$ is defined as $$ \newcommand{\adv}{\mathbf{Adv}} \newcommand{\pr}{\mathbf{Pr}} \adv^\textsf{dist}_{G,H}(A)=\left|\pr[A^G()=1]-\pr[A^H()=1]\right|. $$ Where $A^G()$ denotes the adversary output whe...
Given an encryption scheme that takes as input a key $k$ and converts it to an encryption operation $E$ via the function $M(k) = E$, is it possible that more than one $k$ can give the same $E$? For example, let $k$ and $k'$ be two distinct keys. Is it possible that $M(k) = M(k') = E$. In this sense, the mapping from th...
Nonces are often used to prevent replay attacks in networks. Because they are a one time use, any attacker replaying a request would be stopped because the nonce would be invalid. However using nonces forces the serialisation of requests. Most web APIs are made to be usable concurrently. Are there solutions that enable...
I've been reading through MIT's lecture notes on learning with errors here, and I'm trying to understand the reduction from Search LWE to Decision LWE, as described there in Section 2.7, "Algorithm 1". I cannot seem to understand why we need to repeat the sampling part (for guessing the $i$th coordinate and feeding the...
I have to develop a program using a "secret" locally stored encoded program for a school project. For this I have to decipher the code on the fly to use it. The project recommend the use of AES 256 in CBC mode, but for better performance any suggestion is welcome. So I have two questions: I made my own implementation ...
I was reading up on the recently disclosed Hertzbleed side channel attack(s). It was speculated on Twitter that the elliptic-curve cryptography library libsecp256k1 is not susceptible to these attacks. Firstly, is this true and why? Secondly, if it is true should these protections (e.g. blinding factors) be implemented...
I'm reading the paper Improved OT extension. The author said that in semi-honest model, a single instance of $1$ out of n OT may be used to generate $\log n$ instances of $1$ out of $2$ OT. More precisely, the cost of $\text{OT}_{l}^m$ is exactly equal to the cost of $1$ out of n $\text{OT}_{l\log n}^{m/\log n}$. I won...
As per my understanding that the nonce of AES-GCM in SSL has 3 parts: . salt, 4 bytes, generated in handshake, not changed in whole session . nonce_explicit, 8 bytes, chosen by the sender and carried in each SSL record . inner_counter, 4 bytes, used in AES-GCM internal Question: I am not understanding that, what is ...
Given a value $v = g^ah^b$, with $a,b$ secret, I was wondering whether there was a way to prove in zero knowledge that neither exponent is zero. In other words, given $v$ and $g,h \in \mathbb{G}$, I want to prove $\{a,b \in \mathbb{Z}_p: v = g^ah^b\wedge a\neq 0 \wedge b \neq 0\}$. I know how to achieve the first condi...
From RFC 5246, section 6.2.3.3: AEAD Ciphers: AEAD ciphers take as input a single key, a nonce, a plaintext, and "additional data" to be included in the authentication check, as described in Section 2.1 of [AEAD]. The key is either the client_write_key or the server_write_key. No MAC key is used. I am not able to under...
My book suggested the following protocol to replace SSL: A lot of the terms are familiar to me from the Original SSL, like ChangeCipherSpec message which means from now on the messages I send will be encrypted. and FinishedClient: which is the first message to be encrypted. But few things aren't clear for me: Diffie-...
In many cryptocurrency projects I noticed that 32-byte seeds/secrets are hashed to arrive at new 32-byte keys. The reason why is because you can then, with the addition to an index, use the same seed to generate multiple keypairs/addresses/wallets under one seed/secret. For example: seed1 = hash(seed,0); // abc.. seed2...
I'm so confused by this kind of exercise. We have that $n = p * q$, where $p$ and $q$ are prime numbers. Let's examine this hash function: $h(x) = x^2 \mod n$. Determine if the hash function is pre-image resistant. Can you have collisions?
I am here to ask a question on the current progress of private matching problem. Say, a user has a keyword (e.g. "apple") and a server holds a database of fruit records. Suppose the DB has the record of tuple (ID, name), e.g. (1, apple), (2, pear), (3, grape), and (4, orange). The user wants to learn the following whil...
I'm trying to implement impossible differential cryptanalysis on IDEA cipher based on the Miss in the Middle Attacks on IDEA and Khufu, I've started by implementing the cryptanalysis on 3.5-Round IDEA and in order to achieve this cryptanalysis I need an initial pair set of $2^{32}$ pairs. I've written all the code fro...
I was wondering what is typically the size of digital signature for every 1-bit data that is signed. I am trying to figure out how size of messages increases if I send only the data in a message or packet versus when I send the signed-data. N.B. I am new this world of Cryptography, so don't mind if my question sounds t...
I'm wondering if in public key infrastructure (PKI), a system user be able to set his public key without knowing its corresponding private key. Can this be done?
I came across this scenario recently and would like to understand if there are any practical attacks against this implementation. An RSA private key is used to "encrypt" data. The public key is included in a software component distributed to users and is used to "decrypt" this data. I'm aware that this offers no confid...
I am looking to verify a card cryptogram sent from a smart card chip in accordance with SCP03. According to the SCP03 spec, the CMAC is used to generate a MAC to authenticate messages sent to/from the secure element. The SCP03 spec says that AES in CBC mode is used to do encryption and decryption, but it is unclear wha...
I am working on Victor Shoup's tutorial on game-based security proof and want to figure out some notions from the perspective of probability theory. Consider the following PRF advantage defined on Page 11: $$ \bigl|\,\Pr[s \leftarrow S: A^{F_s}() = 1] - \Pr[f \leftarrow \Gamma_{\ell_1, \ell_2}: A^f() = 1]\,\bigr| $$ wh...
Alice is using AES256 in CTR mode to send encrypted messages to Bob. The messages are 4 byte values. Along with each encrypted message, Alice sends along a random 16 byte IV. f maps a 4 byte value v to the 16 byte values v|v|v|v (concatenates it with itself 4 times). Would it be secure for Alice to randomly generate 4 ...
There is a handful of attacks against AEAD, and GCM in particular, which demonstrates that it is feasible for an attacker $\mathcal{A}$ to obtain a ciphertext $C$ which encrypts to multiple key/message pairs $(k_i, M_i)$. This is commonly referred to AES-GCM not being key-committing. Now, I'm a bit confused about the n...
Though there are many papers available on application of Simon's algorithm for symmetric encryption, nothing is clear on implementation - like how to build the oracle, how many PT-CT combinations are required, what exactly is the hidden string 's' (key or just difference between two messages). Can anyone please explain...
I am working on a smart-contract to be deployed on ETH chain. I am using an oracle(not the company!) system to get the information from off-chain (outside of the blockchain). Basically, we can think of the oracle as an API call which returns a random number. But for this api call I need a random seed. Questions: Can I...
The question is mainly stated in the title. I am new to lattices and I have a basic understanding of them but not something in depth. I was watching a presentation of of a VSS (Verifiable Secret Sharing) scheme that was using lattice based encryption and they mentioned that "We are using lattice based encryption which...
When it comes to stateful schemes, would you really need to use a Merkle tree? Couldn't you sign the hash of the message concatenated to the hash of the new public key? New public key: hash(hash(message) || hash(WOTS+/lamport public key)) Then for every new signature you include the previous signature(s) (without the m...
I want to store two ciphertexts inside the same file. The data stored in each ciphertext is the same (except for padding), but the data was encrypted with different keys and IVs. Both ciphertexts were also generated by the same algorithm. In this case specifically that would be a variant of AES, Chacha20 or Serpent. In...