instruction
stringlengths
32
27.2k
I have a system made of 2 or more parties, already sharing a master key MK, who want to agree on a session key SK (both 128-bit AES keys). One of the parties (the master) starts the protocol by sending a random nonce authenticated by a MAC computed from a shared secret (derived from MK). The request is also protected a...
Recently, the DUHK attack on bad RNG implementations of hardware devices has been published. The attack is based on a (known or reverse engineerable) hardcoded key, which is used for a ANSI X9.31 based PRNG to create key material. According to the blog post by Matthew Green, the attack is explicitely based on the X.931...
One time pad required a truly random key. Why canwt it be a psudo-random key? For example, if the key distribution is that for each bit the probability to get 1 is 0.6 and the probability to get 0 is 0.4, and the eavesdropper knows it, how can he decrypt the message (assuming that the key length is at least as big as t...
I have been searching for a detailed explanation but can’t seem to find a low level one. 1) When CA sign the data with its private key, the encrypted data is APPENED to the csr or the whole cert itself is the encrypted version? Does the encrypted data include contain public key or the whole CSR is encrypted? 2) if it i...
Paillier cryptosystem has self-blinding property. (change one ciphertext into another without changing the content of its decryption) Is there any threshold encryption scheme (or just encryption scheme) which provides one time blinding? (One time blinding means that the number of changing is limited to one.)
I am reading a paper and notice that the term St is used without being defined. I suspect it is a common notation that I am not aware of. It is used in the following paper: https://eprint.iacr.org/2015/482.pdf The first instance of it appears in Section 2.1, in the formula used in Definition 2. What does the St deno...
How can we attack by using chosen plaintext attack (and which plaintext should we choose) if AES didnt have the ShiftRow and Mixcolumn layers. I know each byte would be independent in the 16 byte scheme but couldnt figure out a way to attack.
I'm trying to use the Pohlig-Hellman algorithm to solve for $x$ where $15^x=131 \bmod 337$. This is what I have so far: Prime factors of $p-1$: $336=2^4\cdot3\cdot7$ $q=2$: $x=2^0\cdot x_0+2^1\cdot x_1+2^2\cdot x_2+2^3\cdot x_3$ $x_0$: $131^{168}=15^{168*x_0}$, $-1(\bmod 337) = (-1)^{x_0}(\bmod 337)$, $x_0=1$ $x_1: 13...
The S-Box in AES encryption is a byte substitution step. Is it possible to perform the substitution 2 bytes at a time, rather than 1 byte? What are the challenges/trade-offs involved?
Factoring a 2048 bit number is a difficult topic with a well known complexity. But it seems that p, q, the prime numbers used in RSA (order of magnitude: 10^308) are generated thanks to the probabilistic primality Miller Rabin test. Indeed even a table of primes between 10^307 and 10^308 would be out of reach. Is RSA ...
Consider the following scenario: an adversary $A$ with access to an encryption oracle $\mathcal{O}$ is able to choose $n \in \mathbb{N}$ and pick $p_1,\dots,p_n$ such that $\forall i \in \{1,\dots,n\}:$ $A$ queries $\mathcal{O}$ with $p_i$ in order to obtain ciphertext $c_i := \texttt{AES_CTR_ENC}(p_i,k,IV)$ for some u...
I recently posted a question about AES dual ciphers based on a certain understanding of them. Now I am not so sure if my understanding is correct. AES: a question about dual ciphers and security Originally I thought $AES$ dual ciphers were essentially the same as the original, but with slight (but equally secure) cha...
I'm creating a bloom filter. The purpose of bloom filters is to tell the enquirer whether a value is either definitely not in the set, or is possibly in the set. The only attack vector I can think of is: An attacker has two versions of the bloom filter, the first version containing a set of values and the second versi...
According to this and this paper from Alexander May is possible to factor given the knowledge of the RSA private key. This is possible via Coppersmith and LLL reduction. Now I am trying to implement the code using the reduction in 2 (I prefer this to 1 given the fact []1] uses bivariate integer polynomials). Now I stru...
I have seen a lot of different files with the same MD5s. For CRC32 is quite easy to find collision. But is is it possible to make size, and two different hashes the same? I have seen many linux packages has only one SHA test-sum, why not to increase security with another hashing function? (I am not asking about SHA fam...
I ran across some CSRF code that does: Tokens.prototype._tokenize = function tokenize (secret, salt) { return salt + '-' + hash(salt + '-' + secret) } where hash seems to be a SHA1 digest modified to fit in a multipart/form-data body without extra encoding: function hash (str) { return crypto .createHash('sha1...
I'm reading about Signal Protocol and this protocol uses the X3DH Protocol to establish a shared secret key between the two parties but I couldn't understand why we use one-time prekeys in the flow. This keys are optional and if there is any in the server, in the first message between Bob and Alice, an extra Diffie-Hel...
In my studies, I have seen two common ways that an Honest Verifier Zero Knowledge Proof can be converted to a Zero Knowledge Proof. Either make the proof non-interactive with Fiat-Shamir's Heuristic (thus removing the Verifier) or make the Verifier commit the challenge beforehand. Wouldn't it also be secure for the Pr...
Suppose that we use a public key encryption scheme by keeping the public key secret. Can we consider a public key encryption scheme at least as secure in this private-key setting, when compared to the normal use?
I am using codahale’s Shamir's Secret Sharing implementation of Shamir's secret sharing from Github. I am using this to generate a 32 byte random key encryption key (KEK) to encrypt a 32 byte data encryption key (DEK) which is used to encrypt the data on the Kafka producers. The DEK would be part of the payload, but th...
Let's say I want to use ECs to do asymmetric encryption. Suppose both sides have generated EC keypairs and have exchanged their public keys. I run ECDHE, and get a derived secret. I would then either use that as a key for AES, or create a derived key with an incrementing nonce for subsequent "sessions". My gut tells me...
In RFC5054, the SRP6a algorithm states that the client and the server should generate random ephemeral private values $a$ and $b$ respectively which are used for further derivation in the handshake and in the generation of the shared-key. For a persistent TLS connection, it obviously makes sense to generate a new rando...
In this article about decryption of Enigma(p.259), author says that the second set of rotors was stepped three positions beyond the groundsetting in the Cyclometer Rejewski devised. I would like to know why did he advanced 3 positions for the right rotor in the second set of rotors instead of 1 or 2 positions for th...
Recently, I have been browsing a lot through libraries that implementing Shamir secret sharing. I see a lot of code that implements this cryptographic algorithm without any side channel (timing/branch/cache) resistance or with casual mistakes. Where I come from, side channels in cryptographic code are a big no-no, and ...
We work on C++ code which compiles on Windows and Linux. I have been told that AES encryption/decryption is platform dependent. Is it true? If so, why is it OS dependent?
How can $g$ be derived from $c = g^r \bmod p$ ? $g$ and $r$ are not known, but $c$ and $p$ is. And oracle can provide many $c$ but the $r$ and $p$ is always random. I think this is somewhat related to Decisional Diffie Hellman but I am not sure where to go from there, as the $p$ is always random.
I have a task at hand on designing security on Bluetooth Low Energy application layer. The system is created so that only smartphones with symmetric key (long term) could communicate and control my BLE device. The symmetric key will be stored securely on cloud server and programmed on BLE device with JTAG read protecti...
I am trying to decrypt a message, which was encrypted using a stream cipher and 8 bit LFSR. First two letters of plain text are given: K and A. To find $X_n$ I used following formula: $$X_n = M_n \oplus Y_n$$ I found $X_1 = 81$ and $X_2 = 65$. Assuming the next step would be to find $C_1,C_2,\dots,C_n$ then how can I...
If there is an algorithm securing a document, then why is there also a passphrase when the algorithm is already there? And if there is a passphrase securing a document, then why do we also use the algorithm?
If an attacker may try 10 billion (1E10) random numbers per second. And its attack can last 500 years (500*365*24*3600 = 1.5768E10 seconds). Then the attacker will try 1E10*1.5768E10 = 1.5768E20 combinations. Now suppose I have 100 billion (1E11) tokens, which are random numbers of n bits. I want to calculate n so that...
I have not found a specific answer to this question on here. Shor's algorithm can be used to factorize a large (semi)prime $N$ by reducing the task to period-finding of a function $f(x)=x^a$ mod $N$. This is done by creating an equal superposition over all pairs of $a_i$ and $f(x)=x^{a_i}$ for a random $x$, then measur...
I have an IoT device that I have set up to communicate with AES-256-GCM encryption. The working version has the encryption key stored in plaintext in a file on the device (this is going to be improved). Every time it is communicated with, a new key is included inside the encrypted message and the device updates its key...
Let $F(S) = \text{Keccak-}f[1600](S)$. Assuming that the length of $S$ is equal to $1600 \times k$ and if $k$ is greater than $1$, we define a function $F_{k}(S)$ as follows. We note that $S$ is a concatenation of $k$ $1600$-bit sequences. We denote these parts by $X_1$, $X_2$, ..., $X_k$. We choose (arbitrarily ...
I would like to use cascading encryption with 3 algorithms in a similar fashion to Truecrypt, so for example: Encrypted = AES( Twofish( Serpent(Secret, key1), key2), key3) The aim of this is of course simple: if 1 algorithm is broken, the other(s) still provide security. But what is the best approach to derive each key...
So, my believe is that, in some way, GCM mode or any other authenticated encryption mode is useful to provide encryption and integrity for the ciphertext altogether instead of having to handle the encryption en HMAC separately (as in CBC + HMAC). My confusion, and this might be a little bit directly related to Java API...
Let $G: \{0,1\}^s \rightarrow \{0,1\}^n$ be a pseudorandom generator (PRG). Are the following PRGs? $G'(x) = G(x)_{0,\ldots,n-2}$ ($G'(x)$ drops the last bit of $G(x)$) $G'(x) = G(x) \oplus 1^n$ ($\oplus$ is XOR) Apparently, 1. is PRG because existence of a distinguisher for $G'$ implies existence of a distinguishe...
In the book "Cryptography engineering" (2010, Ferguson), I found, page 209/210, these 3 functions: MsgToRSANumber, SignWithRSA, VerifyRSASignature (see below). I can't understand how the last function VerifyRSASignature works. It seems that it checks if "the given signature $\sigma$ raised to exponent $e$ mod $n$" (thi...
I'm working on a pairing-friendly (Barreto-Naehrig) elliptic curve. If I understand correctly, one consequence of this is that the Decisional Diffie-Hellman assumption no longer holds, but the Computational Diffie-Hellman assumption still should. I'd like to be able to construct linkable ring signatures, but all the li...
I'm working on a little exercise to understand the drawbacks of poor library choices and I've been presented with the following scenario. The HMAC function in python is being used (md5). I know the message being hashed as well as well as the resulting HMAC for this message. The key being used is generated by random.ge...
In the Playfair cipher, is the key space 5 x 5 = 25 or 25 x 25 = 625? I'm trying to work out the size of the key space if each set of equivalent keys is counted as one key.
I have a steganography application that uses one-time-pad encryption. Obviously, key lengths can be very long. If I were to limit the sales market on the Microsoft Store to U.S. only, would that be sufficient action to relieve the application of any Export Admin Regulation? Or, would it still be subject to other forms ...
If a hash function like Whirlpool or Sha512 would take a byte array of 1 MB in size filled with the output of a Secure RNG as its input message, would this be considered a strong input message, a strong key, or neither ?
I understand how RSA can be used for message encryption: Alice wants to send a message to Bob. Bob generates a public key $(n, e)$ and private key $d$; he keeps the private key for himself only, and sends the public key to Alice. Alice encrypts the message with the public key. Alice sends the encrypted message to Bob....
The question stems from the fact that foundations of crypto states: suppose breaking an encryption scheme is NP-complete, then P != NP implies that this encryption is hard to break in the worst case, but does not rule out the possibility that it can be broken almost always. How can this be true, if the encryption is NP...
In Winternitz hash based signature There are two functions $f: \{0,1\}^n \to \{0,1 \}^n$, a one way function and $g: \{0,1\}^* \to \{0,1 \}^n$, cryptographic hash function Key Generation steps First $w$ is selected, where $w$ is number of bits signed simultaneously. The $t_1$ and $t_2$ is calculated as $t_1 = \lceil ...
I have been given the following public RSA key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl2uzoWA2iEGfeqDYO4XA0mQV8odb6qgdLT0T/k1PsbviMMt+SlAnZpwDkPlFySxNejOv8zAUHwDTWV7NGpYA0y+TrrBLkGGl9uUrzOjQLryJmFWsXxBGFd4emYXYBzROaH+r7pzhK7mIWLw1e2Cj5RL9Ac6wKA56axqCr2UZRNDBcS5A+nKTQTWy5eTrq6EQSBA6Hr81UWtYwlNSo1YbZ9JSNdD75Go7Du/z...
Studying both symmetric and asymmetric cryptography and having the hardest time doing so. I wanted to ask what is the best way to go about learning proofs? I don't have a strong mathematical background and i'm struggling to understand the notations etc. Is there anything that can bring me up to speed and as quickly as ...
If I have the AES-CBC encrypted string along with the IV and the plain text before encryption, how can I compute the key which was used for encryption?
I have two very close questions. Question 1 y = AES-128(x, key). Is it possible that AES-128 will return the same y (encrypted text) for different keys? I know that each key selects one permutation from the set of (2^128)! possible permutations. We have (2^128) possible keys and it is less than number of possible per...
If Alice wants to send encrypted message to Bob, she can use Bob's public key to encrypt the plain message. Once Bob reliably gets encrypted message, he can decrypt it with his private key. In this process, Bob will never have to know anything about Alice (assuming message is not tampered). In other words, Alice does n...
I’m thinking about create one software, that will need the user to sign each document, using Ed25519. I need to create something that is secure and simple. Requering use a HSM is not viable and hardware implementation of Ed25519 is closely to nonexistent, and common users not have it. Considering it, the key will be st...
Goal Create a computational puzzle that is fast to generate, takes an average computer minutes to solve, doesn't have any exploitable weaknesses, makes use of existing/tested encryption algorithms Problem Let's say we have a string: "Prefix: LLLLLLLLLLLLLLLLLLLLLL" where L can be any alphanumeric character, "Prefix: " ...
Consider the following hash function family for hashing integers: $Gen(1^k)$: generate 2 $k$-bit primes p,q. Let $n = pq$. Choose random $y \rightarrow QR_n$ and output $n,y$. $H_{(n,y)}(x) = y^x \bmod n$ My question is this hash function collision resistant if the RSA assumption holds?
The only way to access the Curve25519 curve in GPG is through gpg --expert --full-gen-key. From my knowledge, Curve25519 is one of the most secure (and fast) elliptic curves in cryptography. So why is RSA fine, but Curve25519 is considered a risk only experts should take?
Is the H0 block in Argon2 64-bits, or 64-bytes? The RFC says bits: Establish H0 as the 64-bit value as shown below. But then it attempts to generate 64-bytes using Blake2 Background I'm trying to implement Argon2, and the original specs paper, and RFC are not a very friendly to implementors. I'm stuck on the first st...
I've read article after article about curve parameters, generator points, the dot operation, and how you dot the generator point priv times to get the pub point and voila you have ECC! That's where the articles all stop. But how are the number priv and the point pub used to modify data during encryption or signing?
In a book I am reading currently, it asks to perform the addition of $(2,7)$ and $(5,2)$ in the elliptic curve defined as $y^2=x^3+2x+2 \mod 17$. Now, I believe this is impossible, as these points are not part of the group, hence it is not possible to compute the third point. Is that correct? Pretty sure I am correct, ...
All sub-functions are referenced with respect to Keccak. It’s my understanding that the sub-function theta() would result in the largest resource allocation when attempting to invert Keccak. If this is incorrect please edit, comment, or answer. But for this reason I would argue it’s the most valuable sub-function to st...
Say for instance, this webservice offers the following curves. sect283k1 sect283r1 sect409k1 sect409r1 sect571k1 sect571r1 secp256k1 prime256v1 secp384r1 secp521r1 brainpoolP256r1 brainpoolP384r1 brainpoolP512r1 Clients are being...
I assume that most of you know this, but just for the sake of context; Bleichenbacher's signature forgery (https://www.ietf.org/mail-archive/web/openpgp/current/msg00999.html) basically abuses implementations that do not check that the PKCS#1 1.5 padding of a decrypted signature is correctly layed out. Most vulnerable ...
It seems to me that any noise in the signal would result in Alice and Bob generating different keys, without a simple way to tell the difference. How do quantum key distribution systems tolerate noise?
Any hints or suggestion will be helpful.
It is supposedly difficult to introduce enough non-linearity in block ciphers based on modular addition, data-independent bitwise rotations, and XOR to make them secure against certain kinds of cryptanalysis even though addition is used because it introduces non-linearity into the design that XOR does not have. But wha...
I'm analyzing some software and finding key exchanging procedure. Its looks like very similar with Diffie–Hellman, but not the same. I can’t understand the purpose of this. The step of algorithm is: Generate random KEY (128 byte) Get constant G1 and P1 Calculate Y1 = G1 ^ KEY mod P1 // looks like Diffie–Hellman...
Here is the scenario i'm imagining, I use the python random library to generate x-bit key that I use to generate a HMAC-MD5 output. Every HMAC-MD5 has uses a different random number as its key. My question is if I can get a large number of HMAC-MD5 output, is there anyway I can figure out the internal state being used...
If Bitcoin can be forked, and the same address can exist on both blockchains, what stops the re-generation of a privatekey on one blockchain that would also work on the other? For that matter, what stops someone from forking the technology, starting from the genesis block, and using a program to endlessly create addre...
I found some foundations of crypto course notes that mention that these two are equivalent statements of their own degrees of security and was given the following definitions: I was always under the impression that the second definition (the one on the bottom) was the prescribed one for Semantic Security, and that comp...
I am currently working on a huge PHP project and we are seriously considering to use the Libsodium PHP library in it. My question is related to the "sodium crypto box" functionality. We would use this functionality to implement public key authenticated encryption. We would generate keypairs using the "sodium crypto box...
Which parameters should be used to compare AES vs Camellia? Their runtime ? The size of the encrypted data output?
Suppose we have a scheme that works so: $\mathcal{P}_k =:\{P_k\colon \{0,1\}^{2n} \to \{0,1\}^{2n} \}$ is a strong PRP family. Encryption: $\operatorname{Enc}(k,m)=P_k(m\mathbin\Vert r)$, where $\Vert$ indicates the concatenation and $r\leftarrow \\\$ \{0,1\}^n$ ($r$ is random from $\{0,1\}^n$) Decryption: $m\mathbin\V...
I'm confused about whether the following hash function is collision resistant. $x \sqsubseteq y $ denotes that x is equal to y or x precedes y. $ H:\{0, 1\}^* \rightarrow \{0, 1\}^n$ If $x \sqsubseteq y $ then $h(x) \sqsubseteq h(y) $ Does this mean H is collision resistant?
Is there any safe hashing algorithm that returns a different hash each time (like bcrypt) but has the possibility to compare 2 different hashes and determine that they were hashed from the same password/string without knowing this password/string?
I'm aware that Zero-Knowledge for Diffie-Hellman Tuples requires 4 rounds. I wondered if there is any non-interactive version of it.
I am now styding for first year bachelor's degree in Mathematics for IT. In the future I would like to major in the same field and possibly continue trying to get a Ph.D. But I still have options to take a different path. Even though I have a long journey ahead, I am thinking about trying to write a "scientific bachelo...
Obviously, if you need a random number for cryptography, your code should use an api that gets it from hardware. However, not all hardware has a SRNG available. If you are working on a security critical application, and hardware RNG is not available then the appropriate course of action is to abort execution. BUT, not ...
Apologies if this isn't the place to ask this question. I'm an undergraduate math student and I've been reading about elliptic curves. I've learned about the Weil and Tate pairings as well as Miller's algorithm. I was hoping someone would be able to give me some information about what's "out there" that I could look at...
TLDR; Is there a security risk if rather than setting the iteration parameter to 12 (for example), we set it to 3 but call the function 4 times? I'm asking that for 2 reasons: Firstly, we use SRP protocol where the deprecated SHA1 is replaced by Argon2id inside our PWA (Progressive Web App, so in JavaScript) but Firefo...
Is it possible to generate random bits (or any bits we decide) to be imported as a private key and then deducting his public key please? Ideally with a supported Javascript WebCrypto algorithm ( ECDSA, RSASSA-PKCS1-v1.5 or RSA-PSS) or if it's not possible any other algorithm that could be implemented manually. EDIT (a...
There are current state-of-the-art encryption algorithms, which considered absolutely safe currently, like AES. Their speed is around the 100MB/sec ballpark on current PCs (note: this is the speed when AES instruction set is not used - I'm interested in the general case, not when HW acceleration is available). And ther...
$k_0$ is randomly generated and subsequently $k_{i+1} = k_{i}+a$, where $a$ is a large unknown constant I've tried formulating an attack as such: Given 3 Messages $M_0$, $M_1$ $M_2$and with $(r_0,s_0)$, $(r_1,s_1)$ and $(r_2,s_2)$ respectively. We can write $r_0$, $r_1$ and $r_2$ as such: $$r_0 = g^{k_0} {\ }mod{\ } p...
I've been slinging code for a while now, but relatively new to encryption/security. What should I look for when evaluating an encryption method in the wild? For example, the Standard File protocol supports E2E encryption. It's implemented here: https://github.com/standardnotes/web/blob/6fd5719/app/assets/javascripts/ap...
SRP is very useful but if our DB is leaked, an attacker could brute force a user's password with his associated salt/verifier found in the DB. I'm searching a solution to prevent this. My first idea is to not store the salt/verifier in DB, but inside a separate binary file encrypted with our company password. The passw...
It can be shown that if $E$ is a deterministic encryption with key of length $n$ and messages of length $l\geq n + 10$ then there exist two messages $m_0$, $m_1$ and a strategy for Eve so that given an encryption $c = E_{k}(m_b)$ for random $k$ and $b \in \{0, 1\}$, Eve can output $m_b$ with probability at least $0.99$...
I'm reading about Signal Protocol and X3DH Protocol. In the X3DH Protocol, Alice sends a initial message to Bob encrypted with a Shared Key(SK). This SK is calculated using (this section): DH1 = DH(IKa, SPKb) DH2 = DH(EKa, IKb) DH3 = DH(EKa, SPKb) DH4 = DH(EKA, OPKB) SK = KDF(DH1 || DH2 || DH3 || DH4) Where IKa is th...
When it comes to the words "double encryption", I cringe. What I see is the following scenario play out. Someone has plain text and they encrypt it with the AES cipher using the 14 round variant, so AES256. Then they run that encrypted information, through again another 14 rounds thinking it is double encrypted. In ...
I think GPG is difficult to understand . All the different versions and policies and algorythms . But today I got really confused . I tried to create a 3072 bit DSA key ( which as far as I undestand DSA can only be used for signing ) and encrypted some data with it . And well ... It worked . So here are my questions :...
I am surely not an expert on the field, but I heard some people say that NIST P-256 somehow has backdoors. I don't know about the seriousness of this claim; maybe it's just a conspiracy theory. If there is some truth to the hearsay, why is NIST P-256 still implemented? Almost everyone I asked said it's a bad idea to us...
Short and to the point. I'm assuming that it is not a kind of hash function that can be used universally. After having read about universal hash functions used with the one-time pad to form an authentication scheme, these things have bugged me out.
I read the definitions of IND-ATK and NM-ATK in a paper. Let $\Pi = \left( Gen, Enc, Dec \right)$ be a public key scheme. And let $A = \left( A_{1}, A_{2} \right)$ be an adversary attacking $\Pi$ in the sense of IND-ATK. Let $B = \left(B_{1}, B_{2} \right)$ be an adversary attacking $\Pi$ in the sense of NM-ATK. The in...
This might be a newbie question, In elliptic curve, I chosen a secret a and computed aG, where G is the base point. But here since I know G, I can compute inverse of G and multiply it with aG, to get a. I knew I'm terribly missing something here, please explain me what am I missing here? For example on curve25519, I'm ...
What could an attacker do, if he had access to the value $H = AES(0)$ used for authentication in AES-GCM? Could the attacker do anything? Add some data in the authentication chain? Thanks
I want to encrypt a message with AES-EAX manually. Then, i confused how ctr mode in AES-EAX processing the nonce which came from omac process. How the counter be concatenate with the nonce in their primitive ctr mode if the nonce already 128-bit length because padding in omac before. My initial nonce length is 96-bit. ...
I didn't understand the difference between this two definitions, and why UFCMA is weaker than UF-CMVA. Given a $MAC=(Gen,Tag,Vrfy)$ we define $G_{\pi,\mathcal{A}} (\lambda):$ 1) $k \leftarrow \$ \{0,1\}^{\lambda}$ 2) $(m^*,\phi^*) \leftarrow \mathcal{A}(1^\lambda)$ 3) Output $1$ if and only if $Tag_k (m^*)=\phi^*$ and ...
I have done some research about how the DH key exchange is unsafe if an unsafe prime p is used (that is, $p-1$ has a lot of small factors). Many answers here on StackExchange claim that for any factor $r$ where $g^{\frac{p-1}{r}}\neq1$, if given $g$ and $g^x \bmod p$, one can determine the value of $x \bmod r$ in $O(\s...
Given that theres no initial permutation only 16 32 bit long randomly generated keys and the round function is simply f(x) = x ⊕ Ki. Also there are 10 64bit plaintext/cyphertext pairs given. Now I have to show a way to universally break this cypher, but I can only think of brute-force. Any suggestions?
I don't know a thing about cryptography so I'm judging by what I see in APIs docs. I want to use ECDSA or ECDH in my project. And what I know so far about key derivation in this systems is that they: generate a random private key $d$ then do some fancy stuff with it to get a public key $dG$ My question is: can I use ...
I would like to know why the permutation of the right hand rotor given in Rejewski's paper is $PNP^{-1}$. First of all I can't get how he added an $P$(alphabetic permutation) at the front of $N$(right hand rotor permutation) when there's no alphabetic permutation taking place before the current enters the first rotor ...
I was reading about the differences between block ciphers and stream ciphers. One thing that hit me was that stream ciphers like RC4 tend to be susceptible to bit-flipping attacks, in which flipping a bit in the ciphertext can predictably change the plaintext, allowing an attacker who knows the plaintext to change it i...
I'm self-studying NTRU encrypt, and I read following in the book "an introduction to mathematical cryptography" -Chapter 6.10-remark 6.50 (Jeffrey hoffstein, Jill Pipher, Joseph H. silverman): NTRU is an example of a probabilistic cryptosystem, since a single plaintext m(x) has many different encryptions p*h(x)*r(x)+m...
I have had to edit this question because it was too broad (sorry didn't realise that was not allowed...), so, lets go with: Is AES256 the most secure encryption algorithm available at the moment? If not what would be a more suitable alternative? It would be great to see a comparison table for various encryption algorit...