instruction
stringlengths
32
27.2k
Functional signatures use some master key to create a functional signature key. The functional key can be used to sign messages, but only if the message is accepted by some predicate function. For example if Bob is Alice's assistant, she can let him sign documents under her credentials, but only if the document contain...
I hope this question hasn't been asked before: I searched and couldn't directly find it. It is known that in specific applications, compression followed by encryption leaks information of the length of the compressed message, which, combined with the possibility to inject known plain text in the message, can leak suff...
Most password hashes have a cost parameter that indicates how long the algorithm should take. Is there an algorithm where you can increase that cost for a particular hash, without access to the plaintext password? So I have existing hashes in the database with cost=10, and I want to upgrade these to cost=20, without ac...
Since my last post I've been more interested into RSA cryptography, but I'm questioning one thing. Lets say we are using standard textbook RSA with no padding and with the standard signature generation in lets say the Microsoft crypto API and you got the part you want to remove by itself is it possible to remove that f...
Suppose we want to use the RSA-Full Domain Hash (-FDH) signature scheme. This essentially works precisely like textbook RSA but instead of signing $m$ directly, we sign $H(m)$ with $H:\{0,1\}^*\to\mathbb Z_n^*$ being reasonable model-able as a random oracle (we need the ROM for the security reduction). Now my question...
I need to encrypt 20 bytes of data and the encrypted nonce + data + mac cannot exceed 30 bytes in size. I have an implementation but i'm not sure if i'm cutting too many corners and compromising encryption. Using the bouncy castle library i was able to write this. static (byte[],byte[]) encrypt(byte[] data, byte[] ...
Let $G$ be a cyclic group of order $n$, with $n$ an RSA modulus. Let $g$ be a random element generating $G$, and $h$ another element which discrete logarithm to the base $g$ is unknown. Given an element $y \in G$, a representation of $y$ to the bases $g$ and $h$ is a pair $(x_1, x_2)$ such that $$y = g^{x_1} h^{x_2}.$$...
If I remember well, AES (then named Rijndael) won the competition because it was slightly faster to implement as one of its competitors, Serpent, which erred on the side of caution, using 32 rounds as where most probably, 16 rounds would have been sufficient. In a way, the competition was rewarding "highest security p...
From what I've read in section 5.3 of NIST 800-38D it states: The hash subkey, denoted H, is generated by applying the block cipher to the “zero” block. In serious crypto J.P Aumasson describes the implementation of it as H = AES(K,0) for a single block of zeros, hence no block chaining mode, hence no IV as I under...
The $Sage$ code for the AES $S-box$ is below and a link is here: Polynomial representation of the affine part of the AES S-box. An online version of $Sage$ to test this is here. I understand most of it but I cannot understand where the polynomials for $a$ to $h$ come from. Can anyone give a simple example? Even for jus...
In the end of 2013 or the beginning of 2014, I bought 80 000 Applecoins (APC) for 0.1 Bitcoins and got another ten by an airdrop, so I had a total of 80 010. I never spent the coins, and when a coinswap to a new version of Applecoin (APW) happened, I was too late to take advantage of the exchange offer, as I wasn't mo...
How can you design an encrypted storage system, that allows adding and removing users without sharing a common secret and having to re-encrypt everything when a user is removed? My partial idea is: Each user has a RSA key pair. Shared folders have an encryption key (EK1), that is encrypted with each user's public key. ...
I read in the book "Cryptography & Network Security" that it has almost been universally accepted that public-key cryptography is restricted to only being used for key management (Does this mean sending symmetric keys securely using a public-key crypto system?) and signature applications. Can someone explain me if th...
Assume we have a big S-box (i.e. $15*15$). We have truth table of it. (so $2^{15}$ output). How can we find its degree without using Algebraic Normal Form of its Boolean functions. Or with ANF, can you help me to write the algorithm of implementing.
Note: This might be similar to this question. I'm thinking about a hypothetical cryptocurrency where the blockchain doesn't store any transactions. The balance of an address would be stored by the owner, and the blockchain would only contain the root hashes for Merkle trees with hashes of "{address}{balance}". Each blo...
Suppose that: $\boldsymbol{K} \in \{0, 1\}^{\ell_{K}}$. $\boldsymbol{IV} \in \{0, 1\}^{\ell_{IV}}$. $\boldsymbol{I} \in \{0, 1\}^{\ell_{I}}$. $\boldsymbol{X} \in \{0, 1\}^{\ell_{X}}$. $E(K, X): \boldsymbol{K} \times \boldsymbol{X} \rightarrow \boldsymbol{X}$. $D(K, X): \boldsymbol{K} \times \boldsymbol{X} \rightarrow ...
Non-Linearity of an Sbox affects its resistance towards Linear Cryptanalysis. What happens, if an Sbox has low non-linearity (specially with respect to Linear Cryptanalysis)?
I recently got a question that I’ld like to share here, since answers might be useful (or at least interesting) for people diving into Merkle-Damgård hash constructions for the first time. We know that the Merkle-Damgård hash function is based on a fixed size $\{0,1\}^{m+t} \rightarrow \{0,1\}^m$ compression function. ...
This question is aiming at clarification related to message authentication codes (MACs). Wikipedia’s Message Authentication Code article states: In cryptography, a message authentication code (MAC), sometimes known as a tag, is a short piece of information used to authenticate a message—in other words, to confirm tha...
I am facing the the following problem: Lets assume i have a secret, $S$, I want to share it to $N$ players so that $K$ of them can cooperate in order to obtain the secret ($K$,$N$ scheme). Is there a scheme that supports the joining of a new player where a set of $K$ players can issue a new key without obtaining the se...
I have trouble understanding inputs for AES key wrap algorithm as it is explained in section 2.2.1 of RFC3394. Context: I have a data encryption key (DEK) for AES-128 with CTR, which is used to encrypt a database file on a mobile device. DEK is device specific and has limited lifetime (1 year) as key rollover is appli...
I'm just beginning to dip my toes into cryptography and a friend has proposed a cipher and challenged me to figure out how to attack it. I know the process used to encrypt, but am having a hard time wrapping my head around a way to go about attacking it. The cipher is a simple substitution cipher (26 characters possib...
I am trying to obtain a circuit that computes the SHA256 hash for an input message that is greater than 512 bits. I understand how the message is to be padded (we append a 1 and then some zeroes, and then the last 64 bits contain the length of the original message and so on). After I do the padding, I have two 512-bi...
Confusion is a necessary component of any encryption algorithm. S-boxes play an important role in ensuring confusion. If an encryption algorithm does not use any S-box (rather some other Operations/technique to provide confusion), then by looking at Cipher Algorithm, how can we identify which component is providing co...
It was suggested to choose $k$ large Blum primes ($k > 2$), and compute $m = p_1\cdot p_2\cdots p_k$. The trusted center (TC), who knows the prime factors of $m$, computes for each user $U$: $(e_U , d_U )$ and sends it to him. Each user publishes $e_U$ and keeps $d_U$. The question is whether someone apart from the TC...
I'm studying for my final, and some of the practice problems that I have found have discrete logarithms in this notation $L_n(p)$. What does this notation equate to? For example:
Why is SSL not under TCP (the Transport layer)?
Let $E$ be a block cipher that has block size and key size both equal to 64 bits. Let $E'$ be a block cipher that has 64-bit block size and is defined as follows: For a 128 bits key $K \mathbin\Vert K'$ where $K$ and $K'$ are of 64 bits and a given 64-bit plaintext block $P$, we defined $$E'_{(K,K')}(P)=E_K(P) \oplus...
I have a simple program F (think of a cellular automaton) that, when executed in some input X, takes a while to complete and returns a short result (a hash function, for example). How do I produce a short string that proves the result F(X) = Y without requiring the verifier to run the entire computation? I'm aware of z...
I have to send user data from a form to server side and process it. But I would like to encrypt this information to make sure the information is safe. I am using a random word Array as salt, another random word array as IV, userId as passphrase to encrypt the password. Same salt and IV, password (without encryption) as...
In the following link it says: When a 1.3 client connects to a 1.3 server they agree on a resumption key (or PSK, pre-shared key), and the server gives the client a Session Ticket that will help it remember it. The Ticket can be an encrypted copy of the PSK—to avoid state—or a reference number." https://blog.cloudfla...
I generated some random numbers using a Python script. I have the first 40 numbers of the sequence. Is there a way to recover the seed or find the next 460 numbers in the sequence? The numbers were generated using the following code. import random i=1 mn = 1 mx = 2 while i<500: print(random.randint(mn,mx)) mn=...
I want to obtain the plaintexts. Sentence1 9d567b9ae76c8a1c72c9075e28d3537a8325bed6043620216c5d796fa65ef24d46a059 9b0c337e9f32465dae103cdb852cddc2e49ab525e923bf364e5c7602f31ee40805ef36 5340e83ef1ee2220fadb2d58ac6e8cf3d0348c34b7a48887a85d8a864bcd5f4ff5b3dc 0b33ada6b92c069f Sentence2 8c507dc8ce4fb7556bc1554124c54029c420b...
I want to see gpg2 key parameters packets. pgpdump v0.32 doesn't support gpg2 (especially elliptic curve cryptography packets) and "gpg2 --list-packets" doesn't show "secret" key parameters. Is there any way to see (secret) key parameters (d, q and curve) of elliptic curve crypto algorithms in gpg2 exported secret sub...
Which algorithm is recommended to use when encoding / decoding JWT web application tokens? Is using HMAC-SHA256 enough or would using HMAC-SHA512 provide more security? And on 64bit machines, is it true that HMAC-SHA512 is faster than HMAC-SHA256?
As far as I know QKD needs a quantum channel to send the photons. If anyone measures the photons they are useless. It sounds as if Alice needs a fiber optic cable all the way to Bob - or at least line-of-sight to Bob. So no wifi through walls. One of the things that really makes the internet work is packet switching do...
Considering that a PKI has already been established, why can't we use RSA to send the One Time Pad instead of using AES? It makes sense to me since: A trusts the CA which is providing the identity of B and vice versa A obtains the public key of B from the Certificate and uses it to encrypt the pad B decrypts the messa...
We have to comply with third-party security requirements for the loading of 3DES keys. I'm a little confused about the reason behind why Key Check Values (KCVs) can't be full length. As KCV are hashes, I'm wondering what the security implication and risks are?
I have reading about how to bring provable security for cryptographic schemes. There are two models: the standard model and the random oracle model. In random oracle model, is necessary to idealize hash functions, and in the standard model are use reductions from crypographic porotocols to well-known NP-problems. My qu...
Say I have the following signing cert: -----BEGIN CERTIFICATE----- MIIB4zCCAUygAwIBAgIUSyCTib61O8k8TM5JA5n3zDYDFs8wDQYJKoZIhvcNAQEF BQAwHDEaMBgGA1UECgwRcGhwc2VjbGliIGRlbW8gQ0EwIBcNMTcxMjEwMTYxMDIw WhgPOTk5OTEyMzEyMzU5NTlaMBwxGjAYBgNVBAoMEXBocHNlY2xpYiBkZW1vIENB MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCn5XdGJUd9PY9zpksbJ2...
SHA-2 has two functions: $\mathit{Maj}(x, y, z) = (x \land y) \oplus (y \land z) \oplus (x \land z)$ $\mathit{Ch}(x, y, z) = (x \land y) \lor (\neg x \land z)$ Are these two functions non-linear? Can they be used in place of S-boxes in block ciphers?
I am trying to understand how different assumptions might relate to each other and if they are absolute different or if they can be reduced to each other. Can the random oracle be substituted with a PRP with a CRS? Can a PRP construction with a CRS be substituted with a trusted random beacon? is the random oracle a th...
I'm planning to implement a public mailbox for receiving feedback, and I'd like to use hash-based proof-of-work to frustrate spammers. First, we want to use 320-bit capacity Gimli permutation as the underlaying primitive for the sponge-based hash function, because I don't want to make it hard for server to re-evalua...
I am looking to understand ElGamal encryption as it is used in a specic context described below. I am interested in creating a practical form of Mental Poker for games other than poker developed by Phillip Golle in 2005 found here: http://crypto.stanford.edu/~pgolle/papers/poker.pdf The paper describes an algo that is ...
I'm playing around with the idea of a blockchain where both the proof-of-work and verification steps are NP-hard. It seems the NP-hard verification step can be resolved if you allow for multiple parallel blockchains with different sets of blocks in the head of each version. This of course creates another problem of t...
We have the functions $E(K, T, X)$ and $D(K, T, X)$ where for both it is the case that $\{0, 1\}^{\ell_{K}} \times \{0, 1\}^{\ell_{T}} \times \{0, 1\}^{\ell_{X}} \rightarrow \{0, 1\}^{\ell_{X}}$. The value of $\ell_{X}$ is twice that of $\ell_{K}$. The values of $\ell_{K}$ and $\ell_{T}$ are equal. I know that in the c...
I am looking for an answer as if we have DES having 64 bit key and we are encrypting an image it with ECB mode but it doesn't encrypt well. so if we change the key length then will it effect the output or not?
I am currently implementing NTRU, keeping its homomorphic properties. I want to implement rerandomization like this: Encryption: $e = pr * h + m \pmod q$ Rerandomization: $e = e + pr \pmod q$ (using a new random $r$) Decryption is as described in the original NTRU paper. The first few rerandomizations work just f...
I am trying to prove that RSA is a permutation. All I can find is places where it is stated that it is a permutation because the function is bijective. I know that it is, but would like to see a detailed proof. For clarity, we have $N = p \cdot q$, where $p$ and $q$ are prime and $e$ such that $1 = \gcd(e, (p-1)\cdot(...
In the following protocol $(P,V)$, prover $P$ and verifier $V $have common input $(N,X) \epsilon QR$ while the prover also has private input $x \epsilon SR(N,X)$. Let $SR(N,X) = \{x \epsilon$ $Z_{n}^{*} : X = x^{2} mod N\}$ and $QR(N) = \{X \epsilon Z_{n}^{*} : SR(N,X) \neq \phi (empty set)\}$. Also let $QR = \{(N,X) ...
I have read Is sharing the modulus for multiple RSA key pairs secure?, which explains an algorithm for factoring an RSA modulus n given only one encryption and decryption exponent tuple. Given multiple such tuples, is there a more efficient way to compute p and q? It seems like we could set up a system of equations usi...
I've seen a lot of algorithms posted everywhere about how to encrypt using RC4. For example, this wiki article https://en.wikipedia.org/wiki/RC4 explains the KSA and PRGA steps. After it generates bytes, they are XOR'd with a message to encrypt the message. What are the steps for decrypting the message when it is recei...
I've been reading the paper Scalable Zero Knowledge from Cycles of Elliptic Curves, which elegantly solves (what seems to me) the main problem with zkSnarks; namely that performing non-trivial computations requires building enormous arithmetic circuits. The authors do this by showing how to compose verified computation...
assume $N=pq$ where $p$ and $q$ are two large prime numbers and all computations are modulo $N$. given $\phi(N)$, one can prove that the tuple $(a,b,c,d)$ is of the form $(g, g^x,g^y, g^{xy})$, i.e. it is a Diffe-Helman tuple. Question: Can we prove that the $(a,b,c,d)$ is a Diffe-Helman tuple without knowing $\phi(...
I am implementing a radio protocol and trying to prevent replay attacks. It is an embedded system so storing nonce values is not an option, as each node in the system may talk to each other. My plan is to implement a challenge response system to authenticate both ends of the communication. Instead of separately generat...
I want to learn how to calculate the elementwise noninearity of an sbox. I know how to calculate the ANF, and how to create the s box. Now I wanna learn how to calculate the nonlinearity of s box elements "belement.before n after shuffling elements."
I was reading about how a one time pad output can be changed by a third party without the receiving person realising. Surely the output at the other end would be garbage? Also, could you not generate a crc for the output, encrypt it with the same random sequence so at the other end it could be decrypted and checked t...
I have been trying to understand the ROCA attack described here as the "First Attack" and I cannot follow the explaination. I have been trying to generate a 512-bits key and crack it. As far as I can understand, $p$ and $q$ are $65537^a \bmod L$ where $a$ is random and $L = 2\cdot3\cdot5\cdot7\cdot\dots$. If at one poi...
Are there any known good methods of performing authentication over the phone in a way that's not susceptible to replay attacks? The specific scenario that comes to mind is having an automated call centre which verifies the identity through one or more questions. Since the phone line is not guaranteed to be secure (or t...
Blockchain first 16 encrypted bytes, IV, and iter_count – all encoded in Base64: Yms6xqrzCfFsQadVZ5gQonMtnQAAAAAAAAAAAAAAAAAAAAAQJwAA69tYNg== Does it looks like “correct” PBKDF2-SHA1 or does AAAAAA… indicate that something was broken? During the login attemp to blockchain.info I get a response with a base64-encoded pa...
I want to know if encryption with RSA public key provides confidentiality and integrity. I'm quite sure that it provides confidentiality but I have concerns about integrity. If an attacker would scramble ciphertext what would be the result I get? Do I need to put some kind of MAC at the end of messages before encrypti...
Note: This was my in-class problem last week and potentially will be on the exam tomorrow. Thus, I want to reconfirm my thoughts so that I'll be ready to face this type of question (if appear) tomorrow. Question: Assume I have an encryption where the key is computed using a PRP $P$ and the message is computed using a ...
First i transform the s-box into row matrix like if i have 4×4 s-box having 16 elements into 1×16 row matix then substitute the binary values in column . multiply the matrix by mobius trasformation matrix then tell me how to trasform the s-box which is in binary form into decimal form? Also how i calculate the non line...
What are the elements of the multiplicative group $\mathbb Z^{*}_{15}$?
The brutal ciphertext is given. The text volume is more than 6000 characters. It is known that the text is encrypted with a 7x7 matrix. Unknown key and plaintext. Is it possible to crack this code? Russian alphabet. The vector is recalculated modulo 32 (not 26). The search of all matrices on a computer is not possible...
What is the Ord(4) in the multiplicative group $\mathbb{Z}^*_{15}$ I understand the basis of Ord(x) in that for $\mathbb{Z}^*_{15}$ Ord(1)=1 since $1^1=1$ So i assume Ord(4) for $\mathbb{Z}^*_{15}$ is Ord(4)= x since $7^x=1$
Assume I have an encryption scheme $E(k,m) = (P(k,r), G(r) ⊕ m) $ and given that $G$ is a PRG , $P$ is a PRP and $r$ is a random n-bit nonce. My question is: If I run this encryption twice with the same message but different r (due to nonce behavior), will I get the same c? I know that PRG is deterministic, but in...
I know that Argon2d accesses the memory array in a password dependent order and Argon2i accesses the memory array in a password independent order. What is the difference in computational complexity?
I am searching how can I calculate the entropy of a image for a Capture The Flag. I know what is the entropy theory and I tried a pair of things: Convert the jpg image on binary image and calculate the entropy of binary text. Viewing the images and intuiting which has greater entropy I don't know how can I solve it. ...
For a system to be unconditionally secure $H(K) \geq H(M)$, i.e entropy of the secret key must be at least as great as the entropy of the plaintext The mutual information is: $I(X;Y)=H(X)-H(X\mathrel|Y)$ The mutual information will be equal to zero if $H(X\mathrel|Y)=H(X)$. That means the ciphertext does not leak ...
I'm just going by this diagram of KeeLoq encryption and it resembles these diagrams of Crypto-1 and Hitag2. I'm wondering how it is a block cipher. If it is one and that diagram represents most or all of its design, then it is a very exotic block cipher.
Is it possible to attack this construction if the attacker only knows the hash? sha256( mt_rand() .mt_rand() .mt_rand() .mt_rand() .mt_rand() .mt_ra‌​‌​nd() .mt_rand() .mt_‌​ra‌​nd() .mt_rand() .m‌​t_ra‌​nd() .mt_rand()‌​ .mt_ra‌​nd()) If pos...
I’ve been tinkering with SHA-3 for a little bit, and I have some questions regarding the applicability of cache timing attacks on this particular hash function. The two sub functions that I believe are susceptible to this particular attack are THETA and CHI. I think I can prove that THETA does not run in constant time...
I havejust gotten to Linear Cryptanalysis and I'm studying some material on Linear Attack's against SPN. I see here http://www.cs.bc.edu/~straubin/crypto2017/heys.pdf on page 11 that they calculate the Linear Approximation Table but I am completely lost how they got the values in the table. Could someone give me an ex...
When a hacker gets the hash of a password and knows how the client usually sends the data to the server, why is it not possible for the hacker to just build another application that sends the username and the hash (without hashing it again) to the server to log in?
I'm trying to implement a very basic RSA with functions that should generate RSA keys and cipher some text. GenKey function returns a tuple (p,q,n,e,d) like the following. p,q large prime numbers with 1024bits each n = p*q phi(n)=(p-1)(q-1) e as gcd(phi(n),e)=1 and 1 < e < phi(n) d = e⁻1 (mod phi(n)) At the end I'll g...
In the Handbook of Applied Cryptography (Menezes, A. J.; van Oorschot, P. C. & Vanstone, S. A.) Protocol MTI/A0 key agreement (algorithm 12.53) described as $\mod p$-protocol. The survey Overview of Key Agreement Protocols (Ratna Dutta and Rana Barua) describes MTI/A0 as elliptic curve-protocol. Unfortunately I have n...
Are there any cryptographically secure (in terms of confidentiality) key exchange schemes which are usable if one partner in the connection is entirely deterministic and has absolutely no entropy? I know the basics of the operation of several asymmetric ciphers but am not a cryptographer. I wonder this because it seems...
S-boxes with non-linearity greater than 112 are considered prone to side channel attacks. If a non-linear S- box with non- linearity greater than 112 (excluding bent functions with non-linearity of 120) is implemented through lookup tables, then the amount of power consumption should be similar to 112 S-box. In other ...
This may be a stupid question. But how would we determine the security bit of a crypto scheme? For example, SHA2-256 offers 128 bit security due to birthday paradox, so do they measure the security bit by calculating $\log_2$ of best-known attack? However, some scheme is defined as $(t,\epsilon)$-secure. how should we...
Every introduction to elliptic curves that I've read hasn't explained this. If you have two points P and Q on an elliptic curve, to find P+Q, you draw a straight line through the points, find the third point of intersection with the elliptic curve. To get P+Q, reflect across the x-axis. Why reflect across the x-axis? F...
What is a formal definition of strong one-time-secure signatures? I know the Lamport's scheme is one of them, but what is the global definition of it?
When decoding vigeneres, I am left with Caesars. Often when the key is longer, these are shorter so normal frequency analysis won't work. Is there another method I can implement without adding a load of loops?
a) if input 1011 = 0 1 1 1 b) if input 0110 = 1 1 0 0 my answer right?
I've been researching public key exchange algorithms. I am not a cryptography expert but I have a couple of questions on the subject that I can't resolve on my own. Strictly concerning public key exchange methods, do many of these ideas exist? Dozens? Hundreds? I'm trying to understand if many exist that accomplish th...
I'm wondering if it would be possible to implement this functionality with a trusted but transparent third party (maybe an Ethereum smart contract?): Bob has an encryption key. Alice has the encrypted data and wants to buy the key from Bob. Bob sends the key to the smart contract (SC). Alice sends some ether (and perh...
I would like a proof that accomplishes the following: $N$ strings are part of a set $S$. There is a do_proof function on set $S$ that produces a succinct witness statement $P$. $$P = \text{do_proof}(S)$$ For some new string $X$ that is not part of set $S$, I have some proof $$\text{prove_not_a_member}(X, P) = \text{Tr...
Alice has an asymmetric key pair and it also has Bob. They want to encrypt traffic between each other. It would be simple to encrypt the traffic with their public keys, but instead they use key pairs to generate symmetric keys, which are then used to encrypt traffic. Why would you not directly use the asymmetric keys?
In my scenario i have a very simple P2P network usually working "offline" (i mean that the P2P rely on a detached from internet network). Each peer on the network is a IoT device bheave automatically, and the first thing it does is present itself to the P2P network trying to join it. There is no central infrastructure ...
The RSA encryption padding of RSAES-OAEP has a lHash field set to the hash of a label. That label is typically the empty string, or some public description of the intended use of the message. Does the lHash field play some role in the security (confidentiality of M under IND-CCA2 or similar), or security reduction to ...
I've discovered that generating good S-boxes with only modular addition, bitwise XOR, bitwise AND, bitwise OR, bitwise NOT, rotations, and, shifts is difficult. I figure that using them to make a good 4-bit S-box will be easier. But, does using a 4-bit S-box instead of an 8-bit one degrade security by a large margin?
In a cryptographic implementation I’m playing with, there’s a round function which includes a conditional if statement. Stripping the superfluous stuff, the C sourcecode looks like this: void f(uint32_t *state) { … for(round = 0; round < 12; round++) { // functions working on state … if(...
I have been studying Cryptographic Boolean Functions and got stuck with the calculation of cross correlation of two boolean functions. I know the formula is $$c_{f,g}(y) = \sum_{x \in V_{n}} f(x)\cdot g(x\oplus y).$$ What I don't understand is if $f = g$ and $y$ is $0$ shouldn't the correlation be $2^n$? When I calcula...
Provided that I have some data I want to cipher and a password to do it: I generate a random IV I define c = sha256(password) I generate an infinite stream where x0 = sha256(IV xor c) and xi = sha256(xi-1 xor c). This produces blocks of 32 bytes and I yield them byte by byte output = data xor stream Would this be sec...
I am trying to find a schema to ensure that a secret integer lies in the interval [a, b], where a and b are not power of 2. I took a look at hash chains as described in this paper and at 'range proof' with ring signature as described here. Unfortunately, I don't think those systems meets my requirements. Do you know an...
I have thought hard at the risks of data being cracked, it seems to me that the biggest risk is still down to absolute security of the key. On the presumption that the key will be kept secure then: When hacking data how do you decide when you have successfully decrypted it without knowing roughly what it was it the f...
I'm currently trying to gain an understanding of verifiable computation and the strengths and weaknesses of past approaches. In particular, I've been watching the following YouTube video which talks about interactive proofs as a way of verifying knowledge of a computation. On the slide appearing during time 11:55, it ...
I am currently using AES256 in CBC mode with PKCS7 Padding to encrypt some data. It seems like the output size is not always a power of two, which was what I expected. Is it possible to calculate the size in bytes of the output, knowing only the input data?
If I have a set of $N$-byte input values to be hashed using SHA-256, then what are the mapping functions for each of the 256 bits of the output? It seems to me that hashes are one-way partially because we don't know the input size, but if we did know the size to be $N$, then I expect to find a generalized mapping fun...
I'm looking for a type of algorithm that could be used to encrypt text with a shared secret $S$. What I would like to have is the secret to be broken up in three pieces, where any combination of two pieces can be used to reconstruct shared key $S$ in order to decrypt the text. Is there any mathematical or cryptographi...