instruction
stringlengths
32
27.2k
I want to attack a hardware AES. It is with a 128bit in its key. However, according to the documentation I have 11 rounds in this AES. I don't understand why I have 11 rounds? What is the role of the 11th round? Let's suppose that I want t attack the 10th round, must I compute the 10th ciphertext? (I mean that my 11th...
I am a beginner, I can understand the basics of ECC and elliptic curve, I can't find where I missed to understand. But I have a great doubt in ECDH regarding below. Could any of you please clarify for me? I will ask with the help of an example. Example: Let $G=(1,3)$ be the generator point with order $n=18$ for an ell...
I have the following requirements: 64 bits (8 bytes) of data ($D$) that requires confidentiality and integrity; the data itself is a nonce, never need to authenticate/encrypt the same value twice (e.g. a counter); I can only use AES cipher (128-bits key); I can have a maximum of 128 bits as output (one block). Given ...
I have noticed when the RSA public key is 2048 bit, SHA-256 bit used for signatures. When the key is 3072 bit, SHA-384 bit used. When the key is 4096 bit, SHA-512 bit used. I have tried the following commands. openssl genrsa -out my.key 2048 openssl req -new -sha512 -key my.key -out my.csr It worked without any error...
What are the weaknesses in a block cipher that uses modular addition, rotations with fixed amounts, and XOR? Can substitution boxes or permutation boxes be replicated with these three operations? Would the weaknesses in an ARX block cipher be present in an ARX stream cipher?
I would have expected this info to be easier to Google Scholar for, but alas I'm asking here. Partial answers: NTRU key size (confused) the public key consists of one ring, and so it takes up $11 \times 439 = 4829$ bits, which compresses to 604 bytes. what are the NTRU keysize and application in industry? For instan...
In the literature on attacks against hash functions, I frequently come across algorithms requiring $2^n$ work described as being preimage or collision "attacks" on a hash function with only marginally more than $n$ bits of output$^1$. Have I grievously misunderstood the terminology here? If the result of the attack is ...
For large values of $q$, we know that there are worst-case lattice problems which reduce to the average-case short integer solution (SIS) problem. Does this means that for $q=2$, the SIS problem is NOT hard-on-average?
I have this situation where a PC is connected, via RS-232, to a certain hardware module that controls industial machinery. The hardware is supposed to receive commands to turn on or off these machines, and the same command may need to be sent multiple times in a span of a single minute. Now, I am very new to cryptograp...
It seems that AES is non homomorphic. I am seeking a public key non homomorphic encryption that has been proved to be such or at least is accepted as non homomorphic. The internet search leads to those that are homomorphic. Any lead?
Would the following code to test MAC equality leak timing information ? bool equal(unsigned char *a, unsigned char *b, int len) { unsigned char c = 0; for (int i = 0; i < len; i++) { c |= a[i] ^ b[i]; } return c == 0; } More precisely, does the last expression c == 0leak timing information ? ...
If some 64-bit message block (e.g. $M = \text{“12345678”}$) was encoded in DES using one key and the encoded message had the same value (i.e. $E_k(M) = \text{“12345678”}$), would it be possible to determine the DES key based on that?
P.71 of Cryptography Engineeering states "Any weakness in CTR encryption mode immediately implies a chosen plaintext attack on the block cipher." It seems to me that "any weakness" is vague. I'm not quite getting what the author has in mind. Can someone please elaborate? EDIT: The purpose of the statement seems to be t...
Section 3.4.3 "The MixColumns Step"(page 39) of "The Design of Rijndael", it states The columns of the state are considered as polynomials over $\operatorname{GF}(2^8)$ and multiplied modulo $x^4 + 1$ with a fixed polynomial $c(x)$. The polynomial $c(x)$ is given by $c(x) = \mathtt{03} \cdot x^3 + \mathtt{01} \cdo...
I would like to understand the typical size of a lookup table for software implementations of a cryptographic scheme. What size is considered reasonable? What make them (in)efficient? Are there heuristics to determine (without implementing anything) if a table will become interesting?
2.2 Prove that, by redefining the key space, we may assume that $\text{Enc}$ is deterministic without changing $\text{Pr}[\text{Enc}_k(m)=c]$ for any $m, c$. After banging my head against this problem for a few hours, I honestly don't see a modification of the key space that gives the desired result. For all $k,m,$ a...
I've been troubled by this, given any random number as the number of times we'll multiply a point by itself, will we always be guaranteed to land on the curve again? Is there a case where we'll have a miss? Also, is the question to above not always true unless we are in finite fields defined by specific curves? Is this...
From what I understand, in order for a curve to be safe, it would appear that $n$ being the order of the cyclic subgroup of the curve, is a prime. Also, it is the theoretical upper-bound on the number of private keys the curve can issue, thus it should be a good candidate for being the limit on the size of the field. H...
Section 4.1.1 "Finite Field Multiplication"(page 53) of "The Design of Rijndael", it states How the equation 4.1 has been formed and transformed into equation 4.2? In section 2.1.6 "Polynomials and Bytes"(page 15), equation 2.27 and 2.28, highest power of x is 7, whereas in above equations 4.1 and 4.2, it is 8. How...
Is it possible to reverse Diffie-Hellman key exchange to get the private key of one of the parties, given a large prime number 'p' .
My question is about practical limit for brute force attacks. As I know 3DES with 56 bits key length can be broken via brute force. I also heard the same news about 64 bit key length (correct me if I am wrong). My question is about the minimal length of the key that can be considered as a non breakable by classical co...
To my understanding a state is a $4 \times 4$ byte array used to store the plaintext. That equates to $128$ bits of data. To encrypt more than $128$ bits of data do I need to setup multiple of these states in order to encrypt all the data and perform the algorithm on those states? Or is there another method?
While (trying) to go over the reductions from approx. SVP on ideal lattices to search ring-LWE, [1] and [2], for $K = \mathbb{Q}(\zeta)$ where $\zeta$ is an abstract root of a cyclotomic polynomial, the ring-LWE error distribution $\psi$ is defined over $K_\mathbb{R} = K \otimes_{\mathbb{Q}} \mathbb{R} \cong \mathbb{R}...
From https://wiki.openssl.org/index.php/Manual:Enc(1): When a password is being specified using one of the other options, the IV is generated from this password. Why does OpenSSL do this? My expectation would be that an unique IV is generated and encoded in the output message every time you invoke OpenSSL. When decry...
All cryptographic algorithms I know of that satisfy Kerckhoffs's principle rely upon secure random number generation. Assuming the existence of a 'numerical oracle' capable of perfectly predicting the outcome of any random number generator, is a Kerckhoff-compliant algorithm possible?
We have a message denoted $M$. Let us suppose that we have a collision-resistant hash function $h_0$ with output length $n$. We then consider two other independent (different) hash functions $h_1$ and $h_2$, with output length $n/2$. For instance, we can choose SHA-256 for $h_0$, and SHA-256 with a truncated output (12...
[#not_a_crypto_expert] rather than forming the question by the techniques I'll describe the use case: I'm persisting blocks of sensitive binary data in a remote store, the communication is secure (lets assume), but the store may not be. The data needs to be sent and stay encrypted on the remote store - it doesn't get...
I've looked for 256-bit AES encrypted wireless keyboards, and apparently they don't exist. Can anybody explain why this is from a cryptographic point of view? Why wouldn't they just opt-in to the highest standard of encryption, instead of settling for the runner-up? Is there any cryptographic (or closely related) reaso...
I try to understand the reasons behind the design of PSS scheme for RSA. Why is the length of the EM message (that is, the result of PSS transformation just before signing) equals approximately to the size of the modulus? Why PSS does not use a last call to a hash function (for instance SHA-256) so as to reduce the siz...
I want to make a password manager that from a single master password generates passwords for my services. For that I thought that HKDF suits my needs, as it is able to generate multiple keys from a single strong key. Here I read that HKDF is secure if the key is "good" which password aren't. So I thought about using PB...
Currently I am working on PRESENT block cipher implementation (Hardware) and I am unable to understand the role of round counter in key scheduling part of cipher. Can some share some insight on round counter and its working?
I'm specifically looking for curves that are safe (ideally on this list: https://safecurves.cr.yp.to/) and which allow for the fastest scalar multiplication operations on arbitrary points. By 'arbitrary', I mean scalar multiplication with points other than the base point, which are only expected to ever be encountered...
Let's say my friend has made an md5 hash of an email address and sent it to me. The email address will be something like 'jessica_XXXX@gmail.com', and I know it begins with 'jessica_' and ends with '@gmail.com' Does software exist that would allow me to bruteforce the middle part, which is only four unknown characters?...
In an answer to the Question "What are recommended, general strategies to start block-cipher design and/or analysis?", in terms of brute force attack, it is written 256 bits is considered secure forever, even in the face of futuristic quantum computers is it true? or i can consider 128 or 192 bits secure as well ke...
What is the Limit on Maximum Number of Blocks to be Encrypted under One Key in CBC and CTR Mode? What happens if the limit is crossed and more number of blocks are encrypted?
for bcrypt it's probably common knowledge that it isnt binary safe because it uses null termination, which means that when bcrypt is used you need to make sure that no one does these (e.g. by hashing the passwords in a different binary safe function like SHA256 before and encoding the output) by now we have essentially...
From what I heard, many encryption algorithms are based on the assumption that some problems are computationally hard, i.e, NP-complete. In the unlikely event that someone proves that P=NP, these codes will break. Is there a practical encryption algorithm that will remain safe even if P=NP? I.e, an algorithm that depen...
I generated rsa key by jsbn: { "e": "10001", "n": "74a258004dd6c338b27688c1dd13d90da3269321d6dfa3cd8d7cfd7521453d0c5a9828bd507cfc6fe004ddcc09c498d2ceea8e05c214a63ab99d33c9060236f02d5f8bd1e7b334c7f74745948664aeba1a5addf7e7d76911ebf382852aabe86e06f83e0f7669be172380069547f542d8b0848b8bcf53e57c04d5e4163820ced3e4078418e...
From what I read, the backdoor in Dual_EC_DRBG operates by using related $P$ and $Q$ points. Did I understand the idea correctly? Dual_EC_DRBG works by multiplying the $P$ point with the seed initially, and then using the $x$-coordinate of the previous resulting point (let's call that $S$) instead of the seed (that val...
There is currently a GitHub discussion on .NET not supporting AES-GCM for any streaming data since releasing decrypted data prior to tag checks somehow reveals the plaintext or the AES key (or some such undocumented catastrophic failure). A lot of chatter between two choices: 1. Allowing AES-GCM for streaming data Rele...
I'm working on breaking a base64 Vigenere cipher. My guess is that the plaintext has been first base64-encoded, and then a variation of Vigenere with a 64*64 alphabet table used, the alphabet being composed of abc..xyzABC..XYZ012..789/+" The cipher is quite short, and I have pratically no repetitions so Kasiski's test ...
I've created a competition for a few friends of mine that wanted to learn the basics of penetration testing. In said competition, there is one section in which there's a log file you need to check out to find and submit the flag. Since I don't want the players simply looking at the source code and getting the password,...
I have seen that the existence of weak OWFs implies the existence of strong OWFs. It comes from repeating the weak OWF polynomially many times on different random inputs. However, I have a different question here : given a weak one-way permutation $f$, does the function $(f\circ f \circ f \circ \dots \circ f)$, where t...
I'm using mbedTLS to generate RSA signatures, and using PKCS 1.5 I get consistent signature output. I wanted to ask/confirm here that this is secure? There's surely got to be a reason for the PSS scheme, but some googling around left me feeling 1.5 is unbroken and 2.1 is just for a proof. Consistent signatures a great ...
Partially inspired by ring learning with errors (RLWE), I am trying to construct a cryptosystem that requires the use of a non-invertible matrix. Of the methods I've thought of to generate a matrix of determinant $0$, erasing a row/column or two seems the easiest, but I have no idea on how non-invertible this is. I w...
I am writing an exercise in cryptography about anonymous communication. One of the systems I have looked into is the mix net protocol. I want to prove that this is secure. I have seen many different ways of doing this, i.e. using a zero knowledge proof, but I don´t completely understand this. Is there anyone who has a...
In a context involving a block cipher like AES-128, excluding quantum computers, cryptanalytic breakthrough on AES and implementation attacks (poor TRNG, DPA..), and wrench, how confident can we be that by key search, "nobody will crack a 128-bit key" until 2100. Assume business as usual for humanity, use of 1 year wor...
Consider a protocol, wherein Alice wants to send a message $M$ to many friends $F_1, F_2, \dots F_n$, from whom she has (some form of) public keys ($e_{F_i}$, with private key $d_{F_i}$). She does not want her friend Bob ($B=F_1$) to know that she sent the same message to her friend Charlie ($C=F_2$), and vice versa. A...
I know that chop chop attack is because of WEP's insecure checksum mechanism that is CRC32. As TKIP uses MIC along with CRC32 which just makes an attacker to wait for 60 sec upon two mismatch MIC codes. But how does an attacker guess the data by using ARP and Deauth Packets?
Suppose that: $i$ is a zero-based index. $K$ is a secret key. $X$ is a stream of data. $x_{i}$ denotes the $i$th block of data in $X$. $s$ is the number of blocks in $X$. $X = x_{0}\mathbin\|x_{1}\mathbin\|\dots\mathbin\|x_{s-2}\mathbin\|x_{s-1}$. $y_{i}$ is a value derived from $x_{i}$, $i$, and $K$ in a way that in...
What could be the keylength of the DES encryption if we have an output of 64 bytes?
I'm not sure whether this had been a long-standing open problem in cryptography. Definition An associative pseudorandom permutation $f(k,m)$ is a permutation such that: $f(k_1, f(k_2, m)) = f(f(k_1, k_2), m)$ Given $s = f(k, m)$ and $k$, the only way to find $m$ is brutal-force search. The output of $f$ is indistin...
In section 4 (protocol 4.1) of the paper by Naor and Pinkas [1], why did the authors decide to operate in a subgroup? When they say "the messages are in the subgroup" does that mean $x, y, z_0, z_1$, $w_0, w_1$ and the encryption keys are in the subgroup but the private values such as $a, b, r_0, s_0$, etc. are not? Do...
Why can't Bleichenbacher's Attack work for RSA public exponents with values equal to 65537 and above? Does the fact that 65337 is a prime number have any relevance to it?
So we'll have a transform that maps any of $A=2^a$ possible inputs to $B=2^b$ possible outputs. $a$ is generally fixed as the number of bits in the input, and $b$ is determined by the transform used. We'll name the difference $d=a-b$. There's 3 main groups: $d$ is large and the output is much shorter than the input - ...
Is it right that all block ciphers don't provide perfect secrecy like AES? If it's true, how can we prove that? If it's not true can you tell me a sample? Any reference or guidance would be appreciated.
When encrypting a block device with a given symmetric cipher with a 128-bit block size in CBC mode, every second plaintext block in a sector can be changed to contain arbitrary data, with the blocks in between being corrupted. When encrypting with XTS mode on the other hand, an attacker has the ability to corrupt an ar...
i'm new to crypto and am working on a little exercise to understand the weakness of ECB mode encryption. Here is the scenario. I have the plain text I am not tall and the associated cipher-text generated using an unknown key with AES-ECB. Is there any way, apart from brute force, I can change generate the ciphertext...
Suppose that: $E(k, x)$ is the encryption of data block $x$ with key $k$ using a block cipher. $L_{Key}$ is the key size of the block cipher in bits. $L_{Block}$ is the block size of the block cipher in bits. $F(x) = (a \cdot x + c) \mbox{ mod } m$, so it's a linear congruential generator. $m = 2^{L_{Block}}$ is the m...
I came across the ChaosKey and I remember the time I came accros the entrypy key that was always out of stock. I would really want one to play with, I would like the best open source I can get for under 80 USD. According to Wikipedia, ChaosKey is FIPS-140-2 and FST-01 (NeuG) is NIST SP800-22 certified. Now, I must say ...
In section 4.4 (page 6) of Camellia: A 128-Bit Block Cipher Suitable for Multiple Platforms - Design and Analysis, it says $FL$ and $FL^{−1}$ functions are inserted between every 6 rounds of a Feistel network to provide non-regularity across rounds. One of the goals for such a design is to thwart future unknown at...
In Quantum Key Distribution, the distributed key is produced by Privacy Amplification (also known as key distillation). An ID Quantique whitepaper introduces it with a Rudimentary Privacy Amplification Protocol Let us consider a two-bit key shared by the emitter and the receiver and let us assume that it is 01. Let ...
I believe I'm probably not the first person to think of using this as a trapdoor. Let $R$ be a square matrix ring, and $S$ a commutative subgroup of its multiplicative monoid. Let $P \in R$ be a publicly-known matrix such that for all $x \in S$, $x$ can be constructed by calculating $x = P \cdot D \cdot P^{-1}$, whe...
Example: $X$ and $Y$ have the same asymmetric key pair. $X$ communicates with $A$ and gives it's PubKey to $A$. So, $A$ has the PubKey of $X$ which also happens to be the PubKey/PrivKey of $Y$. Now intentionally or by chance, can $A$ intercept and read the signed messages of $Y$? If this can happen, does this not m...
I am considering how long a SHA-1 computation will need on modern CPU/GPU's. Just in case we are interested in brute forcing and consider the birthday paradoxon, then we need consider the SHA-1 output range of 160 (?) Bits. The number of brute force attempts, until our attack is by 50% successful, requires $\left\lcei...
I am trying to decrypt a Vigenere chiper, I saw a lot of youtube videos but I still can get a good value for the key length. In theory I have to get the repetions of letters shifting the text one place every iteration and then see how many steps there are between the biggest numbers, but it gives me no common path.
We know that OWF $f$ such that none of its bits are hardcore exists. We also know that given an algorithm that solves a problem with non-negligible probability, we can repeat it many times and take the majority of the answers. Now, to predict $x$ given $f(x)$, we define predictors $P_i$ for $i$ ∈ $[1..n]$, where $P_i$ p...
I need asymmetric pub/private keypair encryption in JavaScript. Web browsers support RSA-OAEP, which works exactly as I need. But there is a table which lists supported algorithms for web crypto at https://diafygi.github.io/webcrypto-examples/ ... and RSA-OAEP is marked using red color (Discouraged, only use for backwa...
I've been creating a Capture The Flag site and for one of the challenges I wanted you to have to break an encryption algorithm. Granted I want it to be a weak one, so I want the weakest out there. One that needs a password and it's a symmetrical key encryption. One that could be cracked in 20 minutes or less with minim...
I have 20 bytes of data that I need to encrypt and send to a bluetooth node. The main issue being that the receiving node only accepts 20 byte packets. Further, I cannot send multiple packets, one after another, as the node disconnects directly after receiving a packet. The node then connects to a mesh network and push...
Are there dedicated protocols to achieve a private set intersection where one of the set is of small constant size $c$ and the other one of size $n$? What are the resource complexities of this kind of protocol, in terms of communication and computation?
What it says on the tin. Is it still used in things like TLS?
Consider a simplified scenario. Suppose an untrusted server holds a set of data $A=\{ a_1,a_2,\cdots,a_n\}$. A client issues a query $b$ to the server and wants to decide if $b\in A$. The server replies a "yes" or "no". Then how can the client verify the correctness of the server's reply? It is relatively simple if $b...
In this tweet, Paulo Barreto proposes the following elliptic curve over $\mathbb{F}_{2^{255}-19}$: $$ E_\mathrm{PB} : y^2 = x^3 - 3x + 13318 $$ with $G_\mathrm{PB} = (-7, 114)$. Now I would like to try to verify the curve by trying to generate it over some sensible domain. For this I am using this algorithm from this w...
Reductions modulo Mersenne primes are extremely fast, and there are several of a suitable size for modp-based Diffie-Hellman (such as $2^{2281}-1$). Is there any reason such primes are not commonly used for this purpose? Same question also applies to pseudo-Mersenne primes, of the form $2^{n}-c$ for small $c$, which al...
(The following situation is hypothetical.) I need to communicate something securely and I have decided to use one-time pads. I am going to be using human genes as the source of the OTP data (this is important). If I were to use (for example) a weak kind of encryption, in this case a variation of XOR 'encryption', would...
Can someone tell me in laymens terms what this is? $$K_i = \mathrm{Hash}(Z \| \mathit{Counter} \| [\mathit{SharedInfo}])$$ What do the double pipes represent?
A linear feedback shift register can be thought of as an array of bits where NEW_BIT is calculated using F(REGISTERS). F is a function that takes values from two or more elements of REGISTERS and XORs them together. The new value of REGISTERS is equal to (in Python) [F(REGISTERS)] + REGISTERS[1:]. Do the dynamics chang...
How fast in terms of the number AES encryption/sec, would an Internet encryptor need to be if the plain text rate is 10gb/sec?
According to http://www.secg.org/sec1-v2.pdf#page=13 , Rule to add two points with the same x-coordinates when the points are either distinct or have y-coordinate 0: (x, y) + (x, −y) = O for all (x, y) ∈ E(Fp) — i.e. the negative of the point (x, y) is −(x, y) = (x, −y). The fact that it says "when the points are d...
In an $(s,r,n)$-ramp scheme, we require that any subset of at least $r$ parties can recover the secret, while any subset of size at most $s$ cannot learn anything about the secret. In Bogdanov et al.'s paper, they prove that any $(s,r,n)$-ramp secret sharing scheme for a one-bit secret requires shares of at least $\log...
I am looking at implementing AES128 bit encryption of a data stream. Since AES128 is a block cipher, which is inherently less robust than a stream cipher, I have considered configuring AES128 as a stream cipher in OFB mode as shown here. If I use the same IV, will it be more robust than standard ECB (block) mode?
If the permutation is not well thought out, how will this effect the cipher's avalanche effect. For example, if the permutation in PRESENT was in some way different (just made up without any thought) would this adversely affect the avalanche effect? How else might a poorly designed permutation adversely affect PRESENT ...
I'm inheriting a project that stores a used password in a config file, which is generated by the user giving their password in plain text, and the project giving back a key generated through .NET's Rfc2898DeriveBytes with a given salt on the aes encrypted cipher text (which the user then has to put in the config themse...
I'm using the Curve25519 code (from http://www.dlbeer.co.nz/oss/c25519.html), and trying to convert from a public signing key (Edwards form) to a public key-exchange key (Montgomery form). There's test code that does that, but it seems to extract the Y coordinate from the secret key, and if I had the secret key I would...
Referencing: Project Euler Problem 182 Clarification I'm trying to determine the (minimum) period for a given value of $(p, q)$. For a simple case where $p=19,q=23$ the period of repeating order is 132 (which I assume is from 2x2x3x11, the prime factors of 18 and 22). It's trivial to explore the number-space of 132 to...
I would like to apply CTR mode on a arbitrary length which isn't multiple of block size. Is this possible without applying padding. In case we apply padding - how does the decryption algorithm know this padding!?
Sorry, this might be a stupid question but the more questions are here the easier you can use the Internet. To sign your message in Bitcoin network, Alice uses his private key and message content. Bob verifies it with Alice's public key and message content. Why can't a new user Fred just choose Alice's public key and g...
I would like to understand how the attack from the Desmedt and Odlyzko on RSA signatures (and subsequents works) can be made practical. This attack describes a way to forge the signature on a new message using Gauss elimination. The problem is that a message is hashed before the private exponent is applied, so maybe I ...
I am implementing a stream cipher in a microcontroller that only has an AES128 encryption block. According to this page, a block cipher based on an encryption only module can be converted into a stream cipher using CFB, OFB and CTR modes. Assuming I have a unique IV, which is the most robust method to use?
I understand a little how Java's Random class works. I have two random numbers output from calls to nextInt() from a java.util.Random object in Java. I want to determine the next number output after a third call. The first two numbers are: $-1952542633$ and $-284611532$, how can I determine the next number given onl...
Lets say there are 2 parties X and Y. They have agreed on prime number P and generator g. X uses the secret key K. After the key exchange they calculated the common secret key g^4. What are the 2 possible values for the secret key of Y?
We have to implement a way to securely transfer data from a POS to a mobile app using QR codes. The mobile app gets the payment parameters (amount, description, purchase_id, store_id) to create the payment intent by scanning a QR code generated from the POS, the app passes the info to a trusted server through an API a...
Let $G$ be a pseudorandom generator. Is the scheme with encryption $$\text{Enc}_k(m) = s \| \left( m\oplus G(k) \oplus s \right),\quad s\in\{0,1\}^n \text{ uniformly sampled},$$ and decryption $$\text{Dec}_k(s,c) = c \oplus s \oplus G(k)$$ multi-message indistinguishable?
Given $C$ = M $\oplus$ K1 $\oplus$ K2 $\oplus$ K3 One can decrypt $C$ in any sequence, like: $C$ $\oplus$ K1 = M $\oplus$ K2 $\oplus$ K3 $C$ $\oplus$ K1 $\oplus$ K3 = M $\oplus$ K2 $C$ $\oplus$ K1 $\oplus$ K3 $\oplus$ K2 = M Or: $C$ $\oplus$ K2 = M $\oplus$ K1 $\oplus$ K3 $C$ $\oplus$ K1 $\oplus$ K3 = M $\oplu...
Let's say I have a hash value that's 40 alphanumeric characters long. How can I find out which hash function was used to get that hash value?
We are given an arbitrary number $n$ and a sequence of primes $p_1=2$, $p_2=3$, ..., $p_k$. I am interested in the following question: Are the events "Prime $p_i$ is a factor of $n$" independent for distinct primes $p_i$? It seems that the answer is no but I think this depends on the size of $n$. If $n$ is slightly gre...
According to the curve25519 paper a x25519 public key can be represented in 32 bytes. The x25519 library I'm using (bouncycastle) however gives me a 33 byte representation according to this standard. My 33 byte hex representation always begins with the hex 02 or 03. How do I convert a 33 byte representation to a 32 byt...
I am currently a MSc student in number theory and considering switching to a phD in cryptography. I would like to use number theory techniques. (i.e. RSA, elliptic curves, etc). The purpose of all of this is to find a job outside of academia. I would like to find a job in the industry. Here is my worry: in 10-20 year...
What is a preimage and how do you find a preimage of a hash?