instruction
stringlengths
32
27.2k
You may know how sometimes a hash in a URL may be in UUID format, which consists of groups of hex values separated by hyphens. In UUID format, I have come to learn that this hash takes the form: 8-4-4-4-12 for a total of 32 characters. However, I came across a URL that had a hash for a request parameter that looked lik...
I have a certain timecode which I can’t seem to figure out. We gave successfully decoded other codes for the same purpose with the Berlekamp-Massey algorithm, but this code seems to have a linear complexity of 110, which is not practical in any way. It can also not be reconstructed with the 110-bit irreducible polynomi...
If I protected the salt or used a pepper (secret salt) and an attacker got access to the database he can't do a rainbow table attack on a targeted user (a famous or important person). Should I use a pepper (secret salt) ? If yes, then: how to make it unique accros all users or a group of users (not make it global and ...
Can anyone help me understand this: How do we say that one cryptographic primitive is stronger than another?
I am trying to find a generator of a finite group that its powers devides the group into two parts. For example look at the last row of this table that shows the powers of 10 in the group Z_19. You can devide the group to two part. the elements before "10^7 mod 19" that all of them are less than "13" and the elements ...
It is known that the Decision Diffie-Hellman (DDH) problem can be easily solved over groups on pairing friendly curves (that is: one can use pairing to tell if $g^x$ and $g^y$ and $g^z$ forms a DH tuple such that $z = x*y$). What about the "tripartite" case where one has the tuple ($g^x$, $g^y$, $g^z$ and $g^u$) and ne...
My use case: I have few master keys, I use each for a specific operation (e.g. one for encrypting user's data and another for creating JWT signatures etc...). I use these master keys in two specific things: in PBKDF2 as an input + a salt to derive symmetric keys and nonces (iv) and, then store the salt only with the c...
Is it useful to combine HMAC with Bcrypt ? If it so, should I do the HMAC on the password before "Bcrypt"ing it ? or should I do the HMAC on the Bcrypt output ?
I'm looking to create an anonymous e-Voting system which will assign a certain number of bits to each candidate during a vote, e.g. 010000 for Alice, 000100 for Bob, and 000001 for Charlie. It works well with ElGamal on a smaller scale but when I try to do it on a larger scale (adding larger numbers), it times out. On ...
I am trying to understand the Quadratic Sieve algorithm. Currently I am stuck at the sieving part. Let's say the number to be factored is 9788111. I decide to look for 50-smooth factors. My initial factor base (FB) = $p_i$ = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}. I go through each number in the FB & ...
Let's say there is a bilinear pairing $G \times G \rightarrow G_t$ (e.g., for bn128), and let prime $q$ be the order of $G$. Is it possible to find a prime order group over integers such that its order $p | q-1$ (that is $q$ is used as the modulus for the "smaller" group)? I checked the order of bn128 and bs381 groups,...
I am struggling to understand what the "bit/byte" size of a public key is, how you can work it out, and even what it means. An example of a RSA public key is: AAAAB3NzaC1yc2EAAAABJQAAAQB/nAmOjTmezNUDKYvEeIRf2YnwM9/uUG1d0BYsc8/tRtx+RGi7N2lUbp728MXGwdnL9od4cItzky/zVdLZE2cycOa18xBK9cOWmcKS0A8FYBxEQWJ/q9YVUgZbFKfYGaGQxsER+...
Consider the following scenario. Alice picks a number A; Bob picks a number B. Both A and B belong to a relatively small set X (by small I mean that X can be easily looped through: for intuition sake, imagine X to be the size of a deck of cards). I would like Alice and Bob to engage in a protocol that tells both if A =...
I would like to know if there is any standard for storing public and private keys for Schnorr signature
I downloaded the 1st-round NTRUEncrypt submission from NIST website, the spec mentions the mask generation function MGF1 in ASN.1 definition but not in algorithm description. Does the EESS#1 NTRUEncrypt use the MGF1 specified in PKCS#1 at all?
In the paper: "The Random Oracle Model: a Twenty-Year Retrospective", section 7.3 by Koblitz & Menezes,the authors tried to prove the security of ECDSA+. But after looking at the entire proof, I didn’t find that they considered the probability that both forgers would choose the same $M$ and $R'$ for the $j$-th time. In...
I am reading a paper based on elliptic curve bilinear pairing groups. The author has defined the size of private key, public key etc in terms of $|\mathbb{G}_1|, |\mathbb{G}_2|$ and $|\mathbb{G}_T|$. For 80-bit security level, what are the sizes of $|\mathbb{G}_1|, |\mathbb{G}_2|$ and $|\mathbb{G}_T|$ in bits? I want t...
How to decrypt RSA while given $e$,$n$ and the range of $dp$ ? e=2953544268002866703872076551930953722572317122777861299293407053391808199220655289235983088986372630141821049118015752017412642148934113723174855236142887 n=60061281212761724702741431014736199637507259424584501192524911440090184698459179865230077488313626...
Is there a (preferably simple) implementation of ZKP where the verifier already knows the set of possible secrets? Especially if the set is very small (even as few as 2 or 3 options). The prover must convince the verifier that she possesses one of the secrets, but not which one.
I have a question regarding to the Berlekamp–Massey algorithm. Can someone guide me to understand the idea/intuition of this algorithm? According to the explanation in Wikepedia, in each iteration, the algorithm is trying to calculate the discrepancy $δ$. If $δ≠0$, the algorithm will update the error locator polynomial...
How can I identify the cipher that encrypted the data shown below? I'm very new to this field, so I am not sure. For example: How does one know which cipher is used in the following line? How can one decrypt it? $&Es6a@I+v5;|`h_$)q?2Kq75w=p|%tK+)8K)K}d!b_l
I am trying to create a RSA CTF challenge, exposing $n$, $e$, $c$, and $d$. I have set $e=65537$ and $n = p * q$ where $p$ and $q$ are large primes each with 300 digits. I have determined $c=m^e \mod n$ But I have yet to determine a good way to produce $d=e^{(-1)} \mod [(p-1)*(q-1)]$. I tried computing the right as is ...
I am getting only 1 prime factor to some power if i factorize N for RSA decryption. So, in this case what will be the value of P and Q. P will be that one Prime Factor and then there is nothing left for Q. Kindly help me out
Side A generates 16 (high quality) random bytes and performs XOR with a 16-byte secret key, then data transfers to side B, where the same secret key is used to recover the original 16 random bytes. Is there, by chance, a way to guess the secret key by intercepting the XORed data between sides?
I have constructed a true random number generator, and I applied the NIST randomness Test Suite to its results. I have generated around 200 files with my TRNG, each being $10^6$ bits in length. The test reports are as follows: The TRNG failed some of the tests (e.g., Binary Matrix Rank Test) less than $5$ times, i.e., ...
I don't know if I should ask this question in Android Stackexchange or here, but I am sure I am in a right place to ask. My question is about following Samsung Certificate file: File name: I9301I-357537065876500.cert [cert] Model=GT-I9301I IMEI=357537065876500 SerNo=S200013955 ImeiSign=75779BA6B9FF5269A6828F2EAB02049...
I need to know whether it is possible to find the initial key of a Fibonacci LFSR knowing only length and taps and output stream-cipher bit sequence? Plaintext is not ASCII, nor some other sort of printable characters. It's also a bit sequence. LFSR: 15bit $X^{15}+X^{14}+1$
In JKSS12, a proof for the handshake in TLS-DHE 1.2 is given, assuming (among other things) the PRF-ODH hypothesis on the PRF used to derive keys. It is also stated that, if TLS 1.2 was to be modified to follow more closely the $\Sigma_0$ protocol from Canetti-Krawczyk; this protocol could be provably secure under a (w...
I am trying to understand Bulletproofs and it uses the following assumption (Section 2.1): Note: $\mathbb{G}$ is of prime order $p$. My question is about the last sentence in the image -- I cannot prove it. Specifically, I want to prove that $(*)$ if Discrete Log Relation is "broken", then the "plain" Discrete Log is ...
I think I have successfully reverse engineered a Samsung RSA public key here. However, the public key mainly seems to consist of the modulus, but it also contains a 32 bit integer -1 / n[0] mod 2^32, i.e. the inverse of the first 32-bit word of the modulus as well as R^2 (possibly mod n?). Can anybody explain why these...
Is chaos-based encryption a rigorous discipline? And why there are objections to it within the cryptography community? And why are many of its cryptosystems weak? And does it has a promising future? And is there any example of secure cryptographic systems based on chaos? Also, some people differentiate between the legi...
In the sense of security level (as defined, for example, by Ferguson and Schneier in the book Practical Cryptography), does it make sense to use SHA384 with HMAC-SHA256 in the general settings. By birthday paradox, HMAC-SHA256 will give a security level of 128 bits, and SHA384 will give 192 bits. To my understanding, t...
I tried to learn the algorithmic process behind ECDSA and it's pretty challenging. I'm wondering what motivation or thought process might have led to the discovery in the first place. What properties do elliptic curves possess that make them resilient to attack? Predecessor RSA seems somewhat more intuitive and reasona...
Given a 2048-bit RSA public key physically burned into hardware, is it feasible to find a keypair where the public key could be "overlaid"? To detail, each bit in the hardware key is write-once; zeroes can be set to ones, but the write is permanent. The existing RSA public key is 2048-bit and its corresponding private ...
I want to ask if there is any way to store a Schnorr signature key in PEM format, or any other standardized format. And, if possible, I would like to know if that's possible to be done in C language; here's my code so far: EC_KEY *key = EC_KEY_new(); EC_KEY_set_group(*key, group); EC_KEY_set_private_key(*key, *a); EC_K...
In ECC, specifically over finite fields, in my mind there must be other points that exist that still yield $y^2 \bmod p=x^3 + ax + b \bmod p$ to be true but are never used because the Generator Point (or base point) never "lands" on that point before reaching the order and effectively starting over. How can we calculat...
How can we determine if a private key associated with a point, on an EC, is less than or greater than 1/2 $n$, where $n$ is the order?
Can someone help tell how to generate a 3-CNF verifier for SHA-256 that: outputs 1 if message/input's calculated SHA-256 value matches the pre-provided hash Otherwise outputs 0. Given that the message can be arbitrarily long we can assume it to have a finite length (say 2 MB) to make our task simpler.
This may not be a good question, but I am just start to learn cryptography. I would like to ask why a fix permutation is not one way. An adversary is given y=f(x) and try to invert y, x and y are n bits In my opinion, an efficient adversary could only make polynomials query to the permutation. And it could only succeed...
In Dual Watermarking in Tele-radiology using DWT for Data Authentication and Security, the authors wrote: The encryption process uses the Feistel structure consisting multiple rounds for processing the plaintext to obtain the cipher text and each round consisting of a “substitution” followed by a permutation step. In ...
Two lattices are defined as following: \begin{align} \Lambda_q^{\bot}{(A)} & = \{\mathbf{x} \in \mathbb{Z}^m: A\mathbf{x} = \mathbf{0}\text{ mod }q\} \\ \Lambda_q{(A)} & = \{\mathbf{x} \in \mathbb{Z}^m: \mathbf{x} = A^T\mathbf{s} \text{ mod }q \text{ for some } \mathbf{s} \in \mathbb{Z}^n_q\}. \end{align} T.S.T. $\L...
Considering speed and security, which is best: RC5, RC6, CAST-128, LOKI97, or MARS? What does the scoreboard look like? (I'm asking about the abstract math concept, not related to any code implementation. However, hearing about code implementations would be interesting.)
I'm a newbie at cryptography. Here is my question: Alice makes a list of people: Bob, Carol and Dan; Alice gives a unique secret key to every member on the list, so they can uniquely sign messages; Each member has no right to sign more than 1 message; Grace, an observer, needs to be able to check whether a certain mes...
While reading some cryptography papers, I passed by some new terms like the hardware and software implementation of encryption systems. The question: what are the hardware and the software implementations of encryption systems? And what is the difference between them?
Syndrome-trellis code was introduced to minimize embedding distortion in steganography. See this paper: Minimizing Embedding Impact in Steganography using Trellis-Coded Quantization. Background information The following paragraph can be found on this website: Syndrome-trellis codes are essentially binary linear convol...
Alice selects two random numbers from a finite field $Z_p$ : $a$ and $b$. Bob does one of the two following steps randomly (sometimes he does step 1; sometimes step 2): He chooses a random number $r$ from $Z_p$ and calculates $a^r\;mod\;p$ and $b^r\;mod\;p$ and gives these two values to Alice He chooses two different ...
The definition of the known-plaintext attack: I have a plaintext and I can encrypt it to have its ciphertext, then I use this pair to break the cipher. The question: The only thing I further assume is the length of the used known plaintext, not its content. Is this allowable in the known-plaintext attack? A note: I thi...
I am using rsa module in Python. I use the following line to generate public and private key: (public_key, private_key) = rsa.newkeys(2048) And then I encrypt a message using: encrypted_msg = rsa.encrypt(the_msg, public_key) Now assume I want to give the private key to someone, along with the encrypted message. What ...
I just want to know whether my proof is correct, which is about proving that if the Ring-LWE secret is small, then it is unique. Before giving my proof, here is a fact: Fact 1: $\Pr [\Vert r \Vert_\infty \leq \beta: r\xleftarrow{\\\$} R_q]\leq \left(\dfrac{2\beta+1}{q}\right)^n$, where $R_q=\mathbb{Z}_q[X]/(X^n+1)$, wh...
I want to study the DES and AES algorithms The question: What are the minimum mathematics and computer science subjects that I need to understand DES and AES? Edit: I mean how they work internally.
I was doing some reading today about a major tech company planning to implement a new system for automatically detecting and reporting CSAM in users' photos. Overall, the system as described in their 12-page technical summary seems to be designed quite well, and may be as close as you can get to true privacy, while sti...
Let's say that $n$ honest-but-curious parties each hold a value $x_i$. The parties want to learn what is the maximum value across the parties $\{x_1...x_n\}$ without sharing their values (unless they hold the maximum), or knowing who holds the maximum (aside from learning that the holder is or is not them). What are ...
When using openssl cms -encrypt -pwri_password, it follows the process described in RFC 3211, which passes the user-provided password into a KDF, but then, rather than using the output of that KDF to encrypt the content, it instead uses that key as a KEK to encrypt the actual content-encryption key (CEK), which is then...
When studying cryptography, the first thing every student learns is some historical ciphers. There are way too many of those ciphers to name them all. So my question is: What are the most important classical ciphers (every cryptographer should have heard about)?
I think I'm likely missing the term because searching for this is coming up with not so precise results. I'm looking to calculate the n-bit security of say Paillier vs ElGamal vs EC ElGamal, when I use an x-bit key. This paper states that "in order to achieve the 128-bit security level, 4096-bit p and 256-bit q are nor...
In the picture below, for the text underlined in red color: 7X(MOD 11) = 72(MOD 11) =49(MOD 11) My questions are: (1) obviously there is no equal relationship between 72(MOD 11) and 49 (MOD 11), and where does 49 come from? (2) X and Y are picked up randomly, are 7 and 7 in 7X and 11 in MOD 11 also picked up randomly, ...
In the NIST 800-56A rev3 "Recommendation for Pair-Wise Key-Establishment Schemes Using Discrete Logarithm Cryptography" in section 5.6.2.2.3.2 "Recipient Obtains Assurance [of the Static Private Key] Directly from the Claimed Owner (i.e., the Other Party)" it requires 2 conditions to be met during a key-agreement trans...
I would like to learn about message synchronization process of whatsapp cross platform applications for same user. I've checked WA whitepaper and couldn't see any explanation. I'm using both WA WebApp and Phone App at the same time. To achive end to end encryption do my phone and web app create different tunnels betwee...
I know that messages in ElGamal are not deterministic, so a message can have more than one valid signature. But is the number of valid subscriptions infinite?
I am working on masking in CMAC. If masking is not used, then what will be the behavior of CMAC?
For example, Paillier's RSA modulus is $n=pq$, but OU's RSA modulus is $p^2q$. I think when two $n$ are the same, the security of the two cryptographic schemes must be different. So for example, if I take 3072 for Paillier's $n$, how long should I take for OU's $n$?
I am new to security area. I came across mutiple words I can't understand and there is little infomration I can get from google. What is XDH/XEC, is the X means 'enhanced'? Are they just have a different way of generating key pair? According to RFC8422 ECDHE_ECDSA supports the EdDSA as well, does this means EdDSA is j...
Is it possible that the BMA detects an irreducible polynomial from a sequence that was not generated by an LFSR? I am feeding a sequence into the BMA under the assumption that it was generated by an LFSR. It detects a polynomial of a certain length, but the sequence can’t be reconstructed from that polynomial. I don’t ...
Cryptography is the practice of securing communication from unauthorized access. One way of securing information is through encryption, where plaintext (clear text) is transformed into ciphertext using a complex algorithm. The ciphertext is designed to be indistinguishable from random data and difficult to reverse with...
Although there are several proposals of ID-based PKC based on lattices, multivariate cryptography, I want to know why identity (ID) based PKC is not included in the NIST post-quantum competition. Is there any cryptographic standard of NIST that endorses ID-based PKC? Please explain.
How many times is Blake2b called with Argon2? Say argon2 thisissomesalt -d -k 1048576 -p 4 -t 20.
I have studied cryptographic hash functions quite a lot, but have not completely understood whether it is possible to have collision resistance but not pre-image and 2nd pre-image resistance at the same time. Is it possible? Please answer this question with a general example.
I am trying to work out an RSA challenge where I am given n, e, c and the result of n mod (q-1) However, I can't wrap my head around the maths. Could anyone help?
As far as I understand, the Winternitz one-time signature is made by: Making an array of private keys. Making an array of public keys by hashing each private key X times, X being the number of different possibilities of characters that can appear in each position of the message (or the hash of the message) to verify. ...
Update: I made my lattice attack worked finally. As the actual reason is quite complicated I decide to write an answer below to describe how it worked so anyone with similar question might get inspiration from my work. The Question is not modified. I was studying lattice attack recently. I tried to use data from TPM-FA...
RSA is a popular public-key cryptography algorithm. It has some mathematical assumptions. I mean, one cannot apply RSA on elements of any algebraic structure. Elements from certain algebraic structures are only eligible for utilization in RSA. I want to know whether complex numbers fall into those particular algebraic ...
I have been told to design my own algorithm as a college assignment. What I could have come up with was a random cipher. For example: Suppose my plaintext is: AND So I'll take an array the size of my plaintext and keep on storing random values between 0 to 9. I will use random values and my array becomes {3,5,1} My e...
Suppose that $F:K\times X\rightarrow X$ is a function such that for each $k\in K$, the mapping $F_{k}:X\rightarrow X$ defined by letting $F_{k}(x)=F(k,x)$ is a bijection. Suppose that $F$ is the round function for some cryptographic function such as a block cipher or cryptographic hash function. Let $V_{X}$ be the comp...
Authenticated encryption with associated data, such as AES-GCM, will take as input: IV, optional associated data, plaintext and key. A ciphertext and an authentication tag will be produced. Is there a frequently used term for this (IV, optional associated data, ciphertext, auth tag) data structure? I'm looking for a te...
The original Schnorr signature scheme suffers from a Related Key Attack (RKA) as described by Morita et al. The authors of this paper then suggest a modification to the signature algorithm to prevent a RKA as follows: Set $\psi \leftarrow g^x$, where $x$ is the private (signing) key for the scheme. Set the challenge h...
Are there any pairing-friendly curves whose group order is a safe prime? That is: the order of the group is $2q + 1$ for some prime number $q$. Or, is it impossible to have such groups?
Background The following zero-knowledge (ZK) counterexample is described in Canetti's work [Security and Composition of Cryptographic Protocols: A Tutorial, page 26] to show that there exists some protocol that is secure in the stand-alone model but insecure in the UC model: Assume there is such a "puzzle system" that ...
I try to explain the problem (maybe it's trivial): is there a way to do the following: sign a message with private key, send encrypted version of signature and an encrypted version of publickey to verifier in a manner that the verifier can verify the signature without decrypt publickey and signature? Thanx in advance f...
I read about an encryption cipher that needs the changing of the "main" key for the encryption of each plaintext. Sometimes this change depends on the plaintext and is done automatically. Question: Is it practical to build a symmetric encryption cipher that needs the changing of the "main" key for each plaintext? [Edit...
In the Quadratic Sieve algorithm, we first decide on a B & then look for B-smooth prime factors by sieving using a quadratic polynomial. I can find a few formulas which help figure out how to decide on B. To factor a number N, we can use the following: $L = e^{\sqrt {\ln(N)ln(ln(N))}}$ $B = L^{\frac {1}{\sqrt 2}}$ Thi...
Let's say we have a BGV style homomorphic encryption scheme. The message space will be the ring $$R_p = \mathbb Z_p[x]/(x^d + 1)$$ where $p$ is a prime congruent to $1$ modulo $2d$. Now let's say we say messages $m_1(x), m_2(x) \in R_p.$ How do we obtain a ciphertext encrypting both $m_1(x)$ and $m_2(x)$? The BGV paper...
Thanks to reverse engineering papers on Mifare Classic, one can study the authentication protocol. However, I have a problem understanding how it works. In the above document, after the reader responds with $\{n_R\}$ $\{a_R\}$, the tag can now calculate $b_{32}$ (keystream) to $b_{63}$ (thanks to $n_T$, $\text{uid}$ an...
I've often read about the security of a signature scheme in the multi-user setting Link1 Link2, but I couldn't find a real definition. I would like to be sure that I understand it correctly. So my question is: If we consider Def 1, would Def 2 make sense for the multi-user setting? Def 1: The signature scheme yields k-...
Consider that I wish to prove knowledge of some RSA private key corresponding to a public key $(e,N)$. A naive interactive proof scheme would proceed as follows: $V$ generates some random message $m$ and encrypts it, sending the encrypted data $c$ to $P$ $V$ then requests $m$ back from $P$. Assuming $P$ could have no ...
I'm relatively new to the world of crypto (But as far as the math goes, I am familiar with the inner workings. I used to rarely use it for privacy, but now I use it for many things). Anyway, I was taking a look at this URL, and of course I noticed that NIST curves seem to have a lot of weaknesses. More than other curve...
I am looking for possible ways of attacking a modified Vigenère cipher. Let's say we have two keys e.g. 'stackoverflow' and 'Vigenère'. The V cipher starts with one of those keys but switches as soon as it would create a doublet [so the next plaintext letter would decrypt to the same ciphertext letter like (example f...
I'm new to the Cryptography Stack Exchange, so my question might be very naive. What encryption algorithms are out there that will allow different decryption keys to decrypt the same piece of encrypted data? For example : If the data that I'm encrypting is just a simple string : "Test" Then applying the encryption algo...
While The cofactor of the Edwards curve is chosen $4$ in standards, the cofactor of the twisted Edwards curve is chosen $8$. I can't understand the reason for this. Can we choose cofactor $4$ for the twisted Edwards curve? What happens in this case? Is there any security problem in this case?
To write a CTF challenge, I want to create an RSA key pair of size 228-bit. I want the keys exactly in the same format as OpenSSL-generated keys. But, OpenSSL is not supporting less than 512-bit long keys. What could be a solution?
Theoretically, is it secure to first encode a string using Base64 and then XOR it with a random key or are there potential weaknesses that could be exploited? Obviously this doesn't make any sense in practice, but I was curious whether this would be just as secure as XORing and then Base64ing.
Let's use AES as stream cipher, and let's use as an input numbers $1,2,3,...$. This way we should get the random blocks and every block will be different from each other. But I have a pseudorandom blocks generator which generate not always different blocks. So we could get block $B$ once and then for example again afte...
I have a python script that does the ECC point addition (code paste below), it simply performs the P =Q1+Q2 on Jacob coordination. However, when doing some regression tests, I found that if I exchange the P1 and P2 positions, I will get different results, one of which is correct. Below is an example that simply using s...
The texts below are from some tutorial, and it says (in bold format below) a qubit can be both 0 and 1 at the same time. It sounds very strange to me, can you please explain why? Quantum cryptography utilises the physics of photons (light energy according to the formula E = hf) and their physical quantum properties to...
I would like to know what cryptographic primitives could be used for Alice to prove to Bob that she actually executed a program. The goal is to make a Proof-of-useful work, where Alice proves she verified a transaction, but where this proof is tied to Alice's public key. Creating the proof needs to be only possible by ...
I'm studying lattice attack using this sage script. There are 2 options in script: LSB and MSB. The most interesting option for me is MSB. It recovers private key with less then 100 signatures provided with script. When I run it with my PQG generated by openssl and my own signatures with zeroed 8-bit MSB I was able to ...
If a time-based key generated by an authenticator app like Google Authenticator is compromised, can future keys be deduced from the compromised key?
I am trying to code SHA256 from scratch to understand its implementation based on the wiki pseudo code as its clear enough. But I am running into problems with the calculation of W[i] for the first block. I am sure I am missing the logic somewhere. Given a data string of size 80 Bytes (in Hex): "02000000aaf8ab82362344f...
I was playing around with stream ciphers an found this Wikipedia ChaCha20 page (the ChaCha variant). What I'm lost with is how to test this code. There are no testvectors anywhere on that page and I cannot find any. I wrote the following C code: #define ROTL(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) #define QR(a, b, c,...
Considering the English alphabets to be encrypted why is the computation of mod 26 necessary after adding the pad to plain text. Is it just that it adds to another level of encryption or is it used so that two letters may end up with the same symbol in the cypher? 3 mod 26 is 3 and 29 mod 26 is 3.
6 months ago i created a bot that basically stored every users data in json format in different text files and i had a fernet key. I basically didn't touched it for like 2 months now, because it's a bot for students. So here is the thing, school starts is 15 days, i have 106 accounts which are encrypted using a single ...