instruction
stringlengths
33
27.2k
I want to construct a time-limited authorization token using ChaCha20 and Poly1305 as defined by RFC7539. I chose the following simple layout: version || nonce || ciphertext || Poly1305 tag 1B 12B *B 16B where the concatenation of version and nonce is used as the Poly1305's AAD. However, this s...
I am trying to use Grover's algorithm to find Differential characteristic of Feistel and SPN structures block ciphers. basically, which is Finding a good differential characteristic with high probability in the (related-key) differential attack For example, using Matsui’s Algorithm to Search for related-key differen...
I want to know if there is any shortcoming that ABE cannot achieve and that the ABS complete it. I mean why the ABS is included if the authentication and the authorization are already ensured by the ABE. I really need to know the real utility of the ABS and what it brings in more compared to the ABE.
From On the $q$-Strong Diffie-Hellman Problem, the following problem is well-known to be hard. For an randomly chosen element $x \in \mathbb{Z}_p$ and a random generator $g \in \mathbb{G}$, the exponent $q$-strong Diffie-Hellman Problem is, given $(g, g^x, g^{x^2}, \dots, g^{x^{q-1}}) \in \mathbb{G}^{q}$ to compute an...
I've captured my tor client network traffic and noticed that in every packet it sends 2 TLS records first of which is always 32 bytes long. The first TLS record seems not to be carrying any data. What is it for?
I am studying SHA3 in order to create a hardware implementation, preferably in verilog. I have downloaded VHDL reference implementation from https://keccak.team/hardware.html. The code is great, and the reference document really detailed. However I cannot find any way to understand how the VHDL reference implementation...
Considering that we have a homomorphic encryption server working with integers mod p (a large prime number) with access to multiplication, addition and subtraction, is it possible to design an equality function which receives two encrypted values and returns an encrypted 1 if they are equal and an encrypted 0 if they a...
We are working on a project in which we will need to encode and encrypt 1 - 1.3 kb worth of data at a time. We need the result of each piece of data to be the same size it was before, or be smaller, or be only slightly bigger. Basically as small as it can be while still being secure and still being able to get the orig...
I'm trying to get some practical experience on (side channel) attacks. First I want to note all possible vulnerabilities. I thought about: Preset I have physical access and I own/wrote the software, that will be run on that device. It is for academic purpose. Attacking vectors (no side channel) Adressing special secur...
I have heard that public key cryptography may be “totally broken” by Quantum computers running Shor’s algorithm, whils symmetric key ciphers are safe, but Grover’s algorithm may require twice as many bits in the keys. Can someone please elaborate on what exactly is going on underneath, to say these things? What exactly...
My question is about chaining two hash functions to create a robust combiner for preimage resistance. @Zooko already gave a detailed answer here: $$H_{\circ}(x) = H_0(H_1(x))$$ is as strong as the strongest of its two components. However, in the comments below, @Arno Mittelbach showed the idea was dangerous: if $H_0$...
Is using zero IVs with AES-CBC safe, if chosen-plaintext attack (CPA) is not possible and ciphertext indistinguishability is not an issue? Practical example: Alice operates an online service that stores user data on a cloud-based database. Alice is worried about the possibility of someone making off with the database,...
Is there such thing as a keyed reversible hash function? This would be a hash function where computing H(x) is easy and requires no key, but computing x from H(x) is only feasible with the key. Is this absolutely synonymous with digital signatures? Or is this something else and does such a thing exist? It feels like th...
I'm modifying the Diffie Hellman protocol as follows: We are given a large prime number $p$ and exponent $x$ such that $0 \lt x \lt p-1$ and $\mathrm{gcd}(x, p-1) = 1$. Also we pick $g$ such as $1 \lt g \lt p-1$. We are also given $y = (g^x) \bmod{p}$. Essentially, we know about the prime $p$, the exponent $x$ and the ...
Would it be true to say that that one can get away with much smaller cryptographic hashes if the hashing algorithm is slow and expensive by design? Example: let's say you want 128-bit hashes. This is considered insecure today since this is small enough to be able to be attacked via things like rainbow tables (if you ha...
Recently, I studied an article in which it was written that having $(A-B)\oplus C$ and $B\oplus C$, we cannot find $A$. The authors used this result to build a secret sharing scheme, but they did not provide any proof for this claim. In general case, is this claim correct? Note that in special cases(as an example, in $...
I have been doing some research in group and ring signature literature. I am trying to find a ring/group signature which provide the following propriety: Anonymity for the signer Verifiable by a group manager Signer in the group should be able to create the signature on their own The construction should be based on e...
This question deals with a "one-way" function $h$. Then, given the value $y = h(x)$, it is computationally infeasible to find $x$ directly from $y$. (a) Suppose that Peter computes $y = h(x)$, where $x$ is Peter's salary, in Ringgits. If John obtains $y$, how can he determine Peter's salary $x$? (Hint: Adapt the fo...
I am developing something like 1Password and I want to be sure that method that I use is secure. Main idea of the app is storing user passwords, and is protected with a global master password. Main scope of this post is to be sure that algorithms and logic will protect user's sensitive data from brute force, rainbow ta...
There is a requirement for me to both encrypt a file with the clients public key provided to us and sign the same file with our (my own) private key which they have the corresponding public key for. Should this be a 2 step process (i.e. first encrypt then sign) Or can this be done in one shot using a single PGP command...
I want to authenticate server messages to clients. The communication between clients and server is unicast. As I know I can use either used MAC or DSA. by using MAC, I required a shared key between client and server which can be conducted by distributing public key to the client, and the client can generate share key...
I am trying to build a system that would allow information sharing in a kind of zero-knowledge way. Here is the set up: Let's say there is a trusted third party that has Alice's sensitive info M (e.g. date of birth). This 3rd party encrypts M, so C = E(M, a) where a is a secret key. After that, the 3rd party makes C p...
For applications not involving CA signed certificates – or web browsers for that matter – it would seem to be easier to use a raw key pair if possible, rather than deal with potential formatting issues later on. I know they contain metadata and permissions (not sure how the permissions are actually enforced). Is there ...
I realise that cipher and hash primitives are somewhat different. But they share common requirements like attack resistance amongst others. And I realise that attacks /vulnerabilities are different for each. However in addition to resisting attacks, a cipher has to be reversible given the correct key. And it has ...
I'm a student new to cryptography and have a fairly straight forward RSA question that I'm struggling to wrap my head around. "Alice's RSA public key [N:e] is stored in binary as a 16bit integer &: 8bit integer. What is the maximum number of ASCII letters that can be encrypted at once and sent to Alice if assuming no p...
I am looking for a very difficult/slow hashing function to hash secrets used to decrypt env files. Because it is used to log when the env files "keys" get recreated I don't need it to be fast, ideally close to a full second to calculate because I will be in trouble if the keys get stolen but I want to log when I change...
While practically diving into collision resistance, I am trying to first write a non-cryptographic hash (to learn from it) which is limited to arithmetic operations on 32-bit integers only. It produces two 32-bit results similar to MurmurHash2_x86_64 (aka MurmurHash64B), but each have differing initial states and are m...
I would like to have a function $F(x, rnd)$, where $rnd$ is a fresh random value, such that it is hard, given $x_0$ and $x_1$, to distinguish $F(x_0, rnd)$ from $F(x_1, rnd)$, EDIT: but the values should be different, i.e., I should be able to recompute the value from $x_0$ and $rnd$ and see that it is the correct val...
Let's say I have a message (eg: Hello, world!) and I want to encrypt this message using symmetric encryption (AES-256). I am using a list of keys, where I randomly take one as a key (so that each message has a random key). My opponent also has this list of keys, but due to its size it will take too much time to brute-f...
On this course, Micciancio talks about function families (functions parametrized by some value) that can be used in cryptography. On page 2, he presents the following function family parametrized by bases of full-rank lattices: For any invertible $ \mathbf{B} \in \mathbb{R}^{n \times n}$, let $f_\mathbf{B}(\mathbf{x})...
I am looking for a cipher which would allow something like this: E(E(M, a), b) = E(M, ab), where a and b are encryption keys, and ab is a combination of the keys that is impractical to separate into a and b. So far, the only cipher I could find that would work like this is Pohlig-Hellman Exponentiation Cipher. But as I...
Suppose I was given e, p and q_inv. Where q_inv = 1 mod (p). How would one go about computing N to decode the ciphertext?
I am a beginner on cryptography, I've been reading about PKCS11 and usage of PKCS11 on HSM's I understand the concept of HSM, I read about the HD wallets in bitcoin how keys are hashed and combined and hashed again to form a tree, branch, sub branch private + public key list my question if I use an HSM that has the P...
Suppose that Alice, Bob and Charlie want to compute some functions without revealing each input to the function one another. We can construct the protocols using garbled circuits by multiple communications among the three parties. Assuming all the parties are semi-honest, which party do we need to let be online in the ...
If a sender creates a hash H of message M and encrypts it using receiver's public key, what do we ensure of the above three at the receiver's end. PS : I know this is not the right way to send messages but I'm just trying to learn how do things work in such cases.
I've never actually seen a time when somebody has expressed RSA keysize in bytes, and I haven't seen keysize expressed in bytes in other encryption algorithms either (can't be certain that that's always the case). Is there a reason why keysize is almost always expressed in bits instead of bytes (in encryption algorithm...
I'm working on a cryptosystem based on ECC (elliptic curve cryptography). I need to choose several (~10) curve points which should be used as generators, and it's important that their relation is unknown, i.e. no one should be able to obtain one generator by multiplying another one by some scalar. So that just choosing...
Is there any downside to encrypting the original message for signing purposes. I understand this does not provide actual protection, and any one with the public key (any one in the world if the public key is made completely public), however, it would seem if the public keys were kept restricted to TLS tunnels and requi...
I have this question which gives me q=71(my prime number) , a=7(generator), Yb=3(public key), m=30(message), c1=59(first cipher text) and he wants me to find c2 (second cipher text) I know that c2 = rM (r:one time key) , which means I have to find r=Y^k or r=c1^x but I dont have k nor x. The only solution is to solve ...
A Dummy cipher is shown in figure below. Plaintext is 16 bits ($X_1$ and $X_2$ are 8 bit each). Ciphertext is computed after two rounds using two round keys $K_1$ and $K_2$. Can the round keys $K_1$ and $K_2$ be found by solving the system of equations, which involves XOR and Modular Addition? $\boxplus $ = addition m...
I am looking for a specific cryptosystem with the following properties: Suppose a User (Say $User_1$) encrypts a message $M$ with the key $K_1$ (the resulted ciphertext is $C_1$). Another user, say $User_2$, encrypts the ciphertext $C_1$ with another key $K_2$ (the resulted ciphertext is $C_2$). Now, a third user (e.g....
I need to use Pohlig-Hellman exponentiation cipher for reasons explained here. However, I can't seem to find an implementation of this cipher anywhere. It doesn't seem to be too difficult to implement from scratch - so, I want to try. I do have the following questions: How do I go about choosing primes? According to t...
My understanding for AES cipher is just mapping a plaintext of a some length to a ciphertext of the same length. Is the ratio always |Ciphertext|/|Plaintext| = 1? Please correct me if you have noticed something. I may luck some assumptions.
Alice want to send a message $m$ to Bob, and encrypt it with Bob public key $K_B$. $A \rightarrow B : \{m\}K_B$ Lets assume I have intercepted $\{m\}K_B$, I know $K_B$ and I know that $m \in D$ (Alice message belong to a relative small dictionary called $D$ ) By brute force attack, can I got through all $x \in D$ so t...
Following a bunch of questions on the topic of Pohlig-Hellman encryption. I was wondering if this could be trivially adapted to be done over elliptic curves just like we create EC-DH instead of DH. surprisingly my google searches came up with no references for this, or in fact any symmetric encryption based on ellipti...
For instance, I know that the BlackBerry uses a form of ECC built-in for data protection. But would like to know if either the iPhone or Android smartphones, for instance, use a form of RSA? If RSA is not implemented in any modern smartphones, then I would like to know any commonly used technological devices where RSA ...
RSA private exponent is much larger than RSA public exponent. For example, for a 2048 bit RSA private key, the private exponent can have more than 2000 bits. But the public exponent is usually 65537 (0x10001) which has a much shorter bit length. Here is my guess of the reason. Let's use define the following symbols to ...
I am trying to understand if it possible to use DLP to build a keyed one-way function with the following properties: $H_a(H_b(M)) = H_c(M)$, where $a$ and $b$ are the keys, and $c=a*b$ The output of the function is relatively small - e.g. 256 bits The function itself could be $h_a=M^a$ mod $p$, where $p$ is a 256-bit...
I am working on a project which compares SEAL, HElib and libScarab in terms of their execution times and security. I have already checked for the execution times. How do I decide which one of them is more secure? How do I analyse the security provided by these libraries when they are used for certain applications?
Are there any algorithm out there that implements following scenario? Create a master private key Create a private/public key #1 based on the master key Create a private/public key #2 based on the master key Encrypt data #1 with public key #1 Encrypt data #2 with public key #2 Possible to decrypt data #1 with both pri...
Are anonymous credentials (such as IBM Idemix) a type of zero knowledge proofs (ZKP)? if so what type of ZKP are they? The papers such “Security without identification: transaction systems to make big brother obsolete” don not reference ZKP. My understanding is they both refer to similar topics.
In the RSA algorithm, if an attacker wants to get $d$, the attacker does this simply by encrypting random messages $m < N$. If the attacker finds a message $m_1$ that the attacker can not encrypt since $\gcd(N ,m_1) \neq 1$, does this help the attacker in any way in any way? I don't know why the $\gcd(m,N)$ has to be ...
Let $G: \{0,1\}^s \rightarrow \{0,1\}^r$ where $r > s \;$ be a secure pseudo-random generator. Let $\xi = (E,D)$ a semantically secure cipher whose key space is $\{0,1\}^r$ Let $\xi' = (E',D')$ a cipher whose key space is $\{0,1\}^s$ and such that: $E'(k, m) = E(G(k), m)$ $D'(k,\;c)\; = D(G(k),\;c)$ How can I prove ...
Reading the spec of one of the IoT protocols, I found that IV for it one isn't actually random, it consist of $n$ bytes that represents manufacter-specific string; the same for all devices plus 6 bytes of invocation counter. This counter increments every time when the AES cryptography function is called. Is a non-rando...
For CCM mode of AES can anyone explain what the difference is between $B_i$'s and $m$? Is the nonce value for $B_i$'s and $A_i$'s the same? What is $l(a)$ and $L$? What is the minimum value of size of $m$? Does authentication process use the data of $m$?
Note: This question looks like my other question — Any algorithm with a master key for decrypting private key encrypted messages? — which is perfectly answered by @real-or-random, but this one is different in how subkeys are generated. Assume the following: Create a pair of master private/public key Create a private/...
I was wondering if CFB can be better than OFB in any ways. I would like to know in what cases one would use CFB over OFB.
Given many very short (or low-entropy) values – like 6-digit numbers – that are stored as hashes using a fixed secret pepper, e.g.: value | pepper | hash = SHA265(value + pepper) -------+----------------------+----------------------------------------------------------------- 100001 | e03c920babf6325ac56d...
Given a block of data D: Is there a encryption/decryption scheme that would allow me to perform a resource-intensive (compute/time/memory) encryption of the full data set with a key k, but allow for a rapid decryption of arbitrary constant-length parts (say 64 bytes) of this data set? Encryption key k is known to the d...
After reading a lot of articles on ramping up the security of my web accounts, I started using aWallet Password Manager for Android to backup my passwords. I like it for following reasons: I'm able to have fairly good-entropy passwords: I'm able to throw in a mixup of lowercase & UPPERCASE alphabets, digits, special c...
In the case of Smart Contracts, there are self-destruct functions for the contract which can only be run by the contract owner. In many cases attackers have found a way to take over the contract owner. Would it be possible to place an encrypted blob along with the public key and original plain-text message in the sma...
I am not able to understand why if we consider a regular hash function, it is possible to say that we are partitioning the starting set and then apply the the birthday paradox/problem. Can anyone explain?
I have a list of MD5 and SHA-1 hashes where the input string is of the form secret1000 secret1001 … all the way up to secret2000 Are there any attacks, analytical techniques that can give me any insights on the input strings?
Is it possible to encrypt a file (e.g., a text document) such that when a user decrypts it, he/she be able to just read the file and not be able to change the content of the file? I mean, the result of decryption be a read-only file. I think any modification can be detected using message authentication code. I am looki...
I'm curious, how can for example SHA-256 be unique if there are only a limited number of them?! For clarification: how many MD5 hashes are there? $16^{32}$ MD5 hashes can be produced. $16^{64}$ SHA-256 hashes can be produced. while there are $16^{128}$ just SHA-512 hashes, let alone long texts. For more clarification...
I want symmetric encryption algorithms that cannot have their keys recovered when given plaintext and ciphertext. I tried XOR cipher algorithm, but when I've obtained ciphertext and plaintext, the key stream is easily reproduced. Is there any symmetric encryption algorithm that's safe against key-recovery attack when ...
A subset sum problem can be defined as: Given a set of integers $S$ A target integer $x$ Find some subset of elements $s \in S$ such that $\sum_0^{n}s_i = x$ The "density" of a subset sum problem is defined as: $\text{density} = \frac{k}{\operatorname{log}(\operatorname{max}(S))}$ Where $k$ is the number of element...
In RSA we have value of n and e which is known to sender. If the sender keep maintaining a database of possible n's he can easy calculate $\phi(n)$ because he already know $p$ and $q$ then. $d$ is $e^{-1} \mod \phi(n)$. If we choose a large number which is product of two primes, can an attacker predict value of $d$?
I am trying to work out the shared key between Alice and Bob in DHKE equation. The generator is 7 and the Prime P = 71. Bobs private choice of number is 28 and he also receives g ^ A = 70 from Alice. Alice does not seem to have a private choice of number in this equation, all I know is that g ^ A = 70. So how can I cal...
Wikipedia has an rticle about hash lists, although I find it technically not very detailed. For example: We could solve same problem by sending (authenticated) hash of each data block, together with each data block. So, why the need for a root hash? Is it because this way you could send single authenticated root hash, ...
The plan is to encrypt files using an AES-256 in CBC mode secret key. The secret key itself will be encrypted with a RSA 2048-bit public key. Is using AES-CBC sufficiently secure if used in conjunction with RSA? Or must the files be authenticated with AES as well using CBC-MAC, in addition to encrypting the symmetric k...
Until now every tutorial I've seen about linear cryptanalysis, is written on the basis that we have all possible inputs/outputs. Is that a condition? And if not, how many should we have as a minimum? I also noticed that the idea is to find a key that would work for every possible combination. So, when it comes to block...
I have a list of cipher suites I captured using Wireshark. Which one of these cipher suites would possibly be the worst to use. Here is the list. In my opinion, I choose the: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA to be the worst because it uses a 128 bit key and uses CBC instead of GCM cipher mode. Is there any cipher ...
Can someone explain to me how OPRF is based on OT extensions? I'm currently reading papers about private set intersection problem that uses efficient OT-based protocols based on OPRF, the link of the paper is here: https://eprint.iacr.org/2016/930.pdf. I understand how the OT-based PSI works, and how the OPRF is used ...
I've been following this very good tutorial on linear cryptanalysis, and I'm stuck at the linear approximation part. I have no idea what input and output masks are. I don't understand what he's doing and why. Can somebody please help?
While studying Yao's garbled circuits I was mentioned that correlated randomness played some part in MPC. I looked for online documentation but everything I've found is far too complicated for me to understand. Could anyone briefly explain the role (and functioning) of correlated randomness?
I am looking to use randomized public-key encryption in a context where it should also serve as a sort of "binding commitment". That is, I want to encrypt a value $x$ with some randomness $rnd$ under a public key $pk$, denoted $enc(x, rnd, pk)$ for short, such that it is infeasible to find a different plaintext $x'$ an...
Assume I have a password that is exactly 32 characters long. I hash it the following way: Prepend 1524 bytes (known to an attacker) Append 3356 bytes (known to an attacker) Do the checksum It is clearly visible that only a tiny part of the plaintext is variable. Assume the attacker stole the checksum from a DB. How d...
Are there any caveats to the claim that a cryptographic key of size $N$ bits and $N$ bits of entropy are equivalent?
Assume I have a perfect source of entropy, which is unknown to me, and is used to generate a private key (also unknown to me, but usable). If I make a signature with this unknown private key on a constant piece of data (e.g. hash('foo')) and then hash that signature, is the original entropy preserved? Put another way,...
Specifically with TLS, What is RSA used for during key exchange? What is Diffie-Hellman used for? Since RSA already provides authenticity and confidentiality, why is Diffie-Hellman used during the exchange? I've heard DH exchanges aren't secure. Is that something to be worried about in an RSA with Diffie-Hellman excha...
Suppose I have publicly revealed the value of $\phi(u) = A+Bu$, where A, B, u are private values from a large group, that I want to keep in secret. Furthermore, I want to add proof that the value $u$ is from a publicly known set of values, without revealing its real value. How can I do that? Same question with proof ...
For educational purposes (by purpose with small values for the prime order q), I tried to write a small Python implementation of the Schnorr signature described in the Wikipedia article https://en.wikipedia.org/wiki/Schnorr_signature I implemented the following in python (Python 3.6) from hashlib import sha256 from r...
From what I have understood about ECB and CBC, CBC is far better as it doesn't reveal any pattern. There have been several questions here about how ECB is bad: Should I use ECB or CBC encryption mode for my block cipher? Can someone explain the ECB Penguin? Why shouldn't I use ECB encryption? But are there any cases ...
Trying to implement the Diffie-Hellman distributed PRF mentioned by Cachin : https://cachin.com/cc/papers/abba.pdf. It makes sense to me... just use the same Lagrange coefficient I'm using to combine shamir shares, but instead use exponentiation and multiplication ... so the interpolation is happening in the exponent. ...
Do there exist any zkSNARK constructions that are based on post quantum cryptography? The encryption scheme used in the zkSNARK that is employed in Zcash for instance uses an encryption scheme of the form $E(x)=g^x$ for some generator $g$ of an elliptic curve group.
I build some application to encrypt and decrypting some text using ecc My curve paramaters are p = 59 a = 2 b = 2 resulting in 64 points including infinite point. for encrypt and decrypt process i use e1 = (3, 25) d (private key) = 53 Here's the problem that i faced let say i want to encrypt point (45, 48) first, i g...
With quantum-computers looming, there is a need for Public Key Cryptosystems that can withstand attacks by quantum-computers. Are there any known one-way operations that fit the following criteria? Is of course, one-way (you can only do f(x)=y and compute y, but not compute x knowing y), Can run on today's computers e...
I'm trying to understand the security of KDF but stuck with PBKDF case (case 3). Suppose, we have the following settings: $KDF(SK,salt_1) \rightarrow k_1$ $KDF(SK,salt_2) \rightarrow k_2$ The adversary $A$ knows $salt_1$, $salt_2$, $k_2$ (and maybe even more derived keys $k_j$ for salts $salt_j$). His goal is to get $...
I am reading a paper of Furukawa and Sako, "An efficient scheme for proving a shuffle" from 2001. This paper writes a protocol for verifiable shuffling in mixnets. Their protocol make use of permutation matrixes, and they consider the use of ElGamal cryptosystems. A ciphertext $(g,m)$ is shuffled to $(g',m')$ as follow...
I'm a newbie in studying and learning how SIDH works. I have a simple doubt. So my question is in the SIKE submission present in this link (https://csrc.nist.gov/Projects/Post-Quantum-Cryptography/Round-1-Submissions), once you download and unzip the SIKE folder, you get supporting documentation, a .pdf file. In that...
Someone generated a seed for the Mersenne Twister, with the intent of that seed producing this string: "9!dlroW ,olleH"ck,@ Which is 20 characters long. Why he did it is explained below, but I don't know how he hacked it. Why he did it: The user feersum on Code Golf did this to generate a Hello, World! program in the ...
I have built web app that implement Elliptical Curve Cryptography. During testing using data set that i chose on my own, it already run well.. But, for now, i want to test it in some benchmark test, just like AES that have some input, key, and expected cipher test.. is there any similar test for ECC? some program or we...
In this Hacker Noon article, the author seems to give an overview of Merkle trees. However, I have one problem. The author claims you can use Merkle trees to verify the authenticity of data, e.g., if a piece of data is authentic. But I could use a simple hash of the file (signed), for authenticating/checking integrity ...
We are using AES encryption in GCM block mode in order to encrypt a number of different kinds of data at rest on a mobile device - Android. The key used for encryption is stored in the protected key-store offered Android so I am assuming that it is pretty robustly stored. However, we are using the same nonce/IV to enc...
Given N = 91 public key (11, 91) Plaintext (88) Ciphertext = 88 ^11 mod 91 = 30 to decrypt, 30 ^ 59 mod 91 = 88 (plaintext) 30 ^ 11 mod 91 = 88 (plaintext) 30 ^ 47 mod 91 = 88 (plaintext) How can there be multiple suitable instance of private key such as 59/11/47? Lastly, must public and private key always be a prim...
The title says it all really...let's say I have a packet of data that one of my applications needs to store encrypted with a public key (RSA, say, with the private key kept elsewhere). Let's say the application also then needs a way of determining if said packet has already been stored, so I combine it with a randomly ...
RFC 7539 (Section 2.8) specifies a ChaCha20/Poly1305 based AEAD cipher scheme; pseudocode: pad16(x): if (len(x) % 16)==0 then return NULL else return copies(0, 16-(len(x)%16)) end chacha20_aead_encrypt(aad, key, iv, constant, plaintext): nonce = constant | iv otk = poly1305_key_gen(...
I have an encryption line of code as follows: a^x mod y = rem // ^ is the power fx Given x, y, amd rem during decryption, how can we find the value of a? I was thinking of using xth root of rem mod y, but it's not working; probably because of modulo congruence. Can someone please guide me as to what needs to be done...
let $F(k,x)$ be a secure Pseudo-Random Function defined over $\{0,1\}^n$, that means: $F: \{0,1\}^n \times \{0,1\}^n \rightarrow \{0,1\}^n$ define a $G(k,x) = F(k,x) \; \Vert \; 0$ how can one prove that $G$ is not secure? in my point of view, as $F$ is secure, $G$ would always result in some secure output followed by ...