instruction
stringlengths
33
27.2k
Let suppose that the sizes of factors $p$ and $q$ are $b$ bits. We construct two RSA numbers $n$, $n'$ of same sizes. Can we say that the duration to break these two numbers is two times the duration to break one number?
I've just read a paper from 2004 which stated that the RC4 encryption algorithm was restricted to a 40 bit key size when exported from the USA; however the reference for this information (Applied Cryptography - Schneieir) was published in 1996. Here's the link to the paper "The effectiveness of brute force attacks on R...
Recently, a new cipher called Spritz has been released by Ronald L. Rivest and Jacob Schuldt. It should be a "drop-in replacement" for RC4. There are many differences to RC4, Spritz is "spongy" and also has a complete different way to handle the key setup. But still there are many similarities to RC4 in generating the...
Could anyone explain how secure is bit level permutation? What is the most serious threat against the security of this kind of cipher?
I have a question here asking the following: Why do block ciphers need the use of blocking modes? To encrypt messages larger than the size of the block. To avoid having the same block ciphered into the same stream of bits twice. To be able to parallelize some of the operations of ciphering or deciphering the message....
Assume that we have this 256bit key: 15FC0D48 D7F8199C BE399183 4D96F327 10000000 00000000 00000000 On first 0-7 keys we can't apply formula wi=(wi-8 xor wi-5 xor wi-3 xor wi-1 xor phi xor i)<<<1 since on 0 we have negative non exist value 0-8=-8. So currently {k0,k1,k2,k3}=S3{w0,w1,w2,w3} {k4,k5,k6,k7}=S2{w4,w5,w6,w7}...
Is there are any possibility to see trace(example) of Serpent Encryption/Decryption on concrete plaintext/key example, (not code implementation) or at least animation of steps. During reading of Serpent I found article on IDEA Encryption with full round description on concrete plaintext https://ru.wikipedia.org/wiki/ID...
MD5 processes a 512-bit block and produces a 128-bit (16 byte) message digest often expressed as 32-digit hexadecimal value For example if I hash the word "how" using MD5 , I get the following hash value db88a0257c220dbfdd2e40f6152d6a8d The word "how" is represented in 3 bytes which is 24 bits. How does MD5 process a ...
I am using the PKCS#11 function C_Sign to sign some data. The output I get is just a signature. How do I get it in PKCS#7 format - i.e. ASN1 with signature and certificate (for detached) or ASN1 with signature, certificate & unsigned string (for attached).
I am looking for an easy to follow explanation, if possible, that demonstrates/proves the validity (or not!) of this assertion: for any X, md5(X) != X (being X any string of 32 hex characters)
Assuming all inputs are same length as rate except last can be shorter. Is it necessary to pad every input (not just last) to sponge for authenticated encryption to be secure? Is this just, because it is wrapped around Absorb and Squeeze? What is purpose of frame bit in SpongeWrap?
I have a rather silly question regarding the comparison of RSA with ElGamal over integers. If you want to compare their performance in the same level of security, does the modulus of both of them need to be the same size, or does RSA have to be double the size of ElGamal?
Where did SHAKE128 and SHAKE256 originate from? I am trying to find them in the original Keccak documentation but can't find them. Is it some special mode of Keccak referenced in the documentation? Or something invented by NIST and added to the SHA3 standard? Any public cryptanalysis done on them?
I have a point in affine coordinates: $(x,y)$. What should I do when I want to convert to $(X,Y,Z)$ in Jacobian coordinates? I need it for calculating ECC in a prime field.
I'm trying to understand, why the Filesize of a Caesar Cipher encrypted foo.txt.zip File is smaller than a Caesar cipher encrypted foo.txt File. For example: Foo.txt size: 90bytes foo.txt.Caesar.enc output File: 92bytes (Here every character is shifted with the same size so the bytelength is nearly the same) But why is...
TOTP (Time-based One-Time Password) Algorithm is used in Two factor authentication. I understand the algorithm and that current time is used as a variable to generate a token. Wiki page for reference: http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm My question is, can current time be faked? Suppose ...
Leo Ducas and Daniele Micciancio's recent paper "FHE Bootstrapping in less than a second" gave an exciting result that one can compute the `atom operation' of Fully Homomorphic Encryption (i.e. NAND-and-Recrypt) within 1 second without loss of security. I am trying to figure out how their scheme works. However the key...
Is there any published work on implementing a online auction, which uses "remote coin flip" to prevent auctioneer cheating when choosing winner and bid value? Is there any possible way to use remote coin flip for a such scenario? Note: in a Vickrey auction, bidders submit written bids without knowing the bid of the oth...
Let $H_1$, $H_2$ be keyed hash functions (e.g. $H_i(x) = SHA_{256}(s_i||x)$ for pseudorandom $s_1$, $s_2$). Let $s_n = H_1^k(s_0)$, $k_n = H_2(s_n)$, where $s_0$ is a secret (pseudorandomly chosen from a distribution). Is using $k_n$ as a sequence of forward-secure keys secure (i.e., forgetting $s_n$ when changing to $...
I want to use Salsa 20 in Java, so I downloaded Bouncy Castle, and... it makes no sense to me. I've got it working, but most of my choices were essentially random. But I can't see there anything leading me to the right path. The interface CipherParameters accepts nearly any nonsense and a key size of 257 bits works per...
I know there are XEX, XTS and other ways to add tweak to block cipher without modifying cipher itself. However they are quite slow and/or complex. If we assume we have a secure block cipher round function (like AES) with pseudo-independent round keys (generated with stream cipher). Is it safe to add tweak with same siz...
Here is a cartoon about password entropy. http://xkcd.com/936/ I dont quite understand how the entropy is calculated in the cartoon assuming they are calculate correctly. But in general, I dont have much idea about how password entropy is calculated.
I am looking towards using NSS in a Linux application that makes use of a TPM (HSM). So, I am checking the support of PKCS 11 in NSS, at least for the management of Elliptic Curve keys, signature with EC keys, RNG. I read contradictory things. First, on the NSS site, it is said that only a subset of PKCS #11 is support...
I've been looking at the paper of Boneh, Boyen, Goh Hierarchical Identity Based Encryption with Constant Size Ciphertext which contains a general theorem (Theorem A.2) about the advantage of an attacker in the generic group model. It seems to be based on the idea that in the generic bilinear group model, we can only co...
I am wanting to secure some highly sensitive data in a database. This would mean that the data needs to be encrypted and remain secure for 100 years if it were to fall into adversary hands. I also want to limit the amount of data that is vulnerable in plaintext at a time in RAM. This is so there is less chance of plain...
Consider the following experiment: Let there be a machine which runs (ie. continually clocks) an LFSR of size (ie. number of bits) $b$, having a button that, when pressed, extracts the next $t$ bits from the LFSR, prints them onto a paper ticket, deposits the ticket into a sealed, opaque urn, and complements every bit...
I am currently working on a research on end-to-end security implementation for Advanced Metering Infrastructure (AMI). Pardon me if I a bit off topic or not asking the right question as I am relatively new in the cryptography field and hope to get more information. So basically I am to research on implementing security...
I'm not too familiar with the math involved with the exchange of keys, I've read it over several times, but math isn't my strong point. My understanding is that smart people are hard at work to overcome the difficulty of factoring the shared secret. So assuming that quantum processors overcome the current implementatio...
I'd like to use a password-based system on a remote host (accessed via SSH) without having to copy-and-paste the password and without storing it on disk. Using the system with some other form of authentication is not an option. One possible solution is to talk directly to ssh-agent and have it sign a constant token an...
Then why don't we use xxxxxxx bits encryption? what stopping us from using a very lengthy key? I am referring to the encryption we use with SSL
I am learning about Hill Cipher and know that it is a block cipher where each block of n letters (considered as an $n$-component vector) is multiplied by an invertible $n \times n$ matrix, again modulus $26$. The article did not touch on what happens if the the block of letters is less than length $n$. Eg: Assume I a...
We have ciphers that handle small amounts of entropy, such as a 256 bit key for AES; and we have one time pads for enciphering 1:1 entropy, such as a 1GB key for a 1GB file if you could ever harvest enough decent random noise. Now in theory you would imagine that there is a universal class or model of cipher that can ...
What is the output of an r-round Feistel network when the input is $(L_0, R_0)$ and each round function outputs all 0s, regardless of the input?
I'm creating a prototype for a messaging queue with some custom logic (can't re-use any existing solution). One requirement is to have all messages encrypted. There are three classes of nodes subscribing to the queue with the following permissions: Read/Write access Read-only access Buffer/forwarder with no access to ...
What's the meaning of "160-bit curve" in an elliptic curve? Or 192, 224, 256, etc. And what is the standard for selecting this number of bits? Why they don't say "100-bit curve"?
I am using the same password for some encrypted files currently (I know this is bad practice, though), and I wonder whether an attacker could decrypt if one decrypted file fell into his hands.
Does the following hold in bilinear pairings? $$e(g^{a_1x_1}g^{a_2x_2},g^{c_1}g^{c_2})=e(g^{x_1+x_2},g^{a_1a_2(c_1+c_2)})$$
One can find up to date recommended key sizes for RSA at NIST sp800-131A for example. In short, it suggests a key size of at least 2048 bits. Is it possible to find a history of recommended key sizes for RSA, going back to the invention of RSA?
If RSA (textbook RSA that is) generates a digital signature by using the sender's private key, couldn't any cryptosystem (the only two that come to mind are RSA and ElGamal) capable of asymmetric encryption do the same? For example, I've read that ElGamal is encryption only. Why can't ElGamal encryption (not DSA) do th...
I'm looking to compare (for byte-for-byte equality) two binary files. I already have the process down: Check for existence etc. Compare file lengths Use a hash or CRC of a sort (right now I use MD5) to look for an obvious inequality Finally, byte-for-byte compare them (I have a way of doing this in chunks to speed it ...
This question comes to mind after seeing "custom" Bitcoin addresses with some special string at the beginning of the address. They are generated in the same way Bitcoins are "mined", continually hashing with a nonce + password to get some desired output. My question is, is it just as hard to find [HLOWRLD]M9VveeBLcY4U...
I have two devices which communicate via sms. This communication should now be encrypted. The devices can only send messages with the lenght of 160 characters. So i am looking for an encryption system which can limit the length of the encypted message to 160. Is there such a cryptography system? Which system that meets...
I came across these questions while studying for a crypto course, does anyone have any ideas on how to answer these? (a) Random prime numbers of size 1536 bits are chosen to generate an RSA modulus of size 3072 bits. Knowing that the number field sieve factorization algorithm would succeed in factorizing an RSA modulu...
After reading through https://datatracker.ietf.org/doc/html/draft-ietf-tls-downgrade-scsv-0, I could understand that this option is recommened for use when one has legacy SSL Servers which only support SSLv3. But could not understand how this option helps even after reading couple of articles. Can anyone help me in und...
Suppose I receive a list of 1 million coinflips, and I want to know how likely it is that the list was randomly generated. My first thought would be to count the number of heads and tails, which should be evenly distributed (around 500.000). But suppose the distribution looks normal, its still possible the list contain...
If i want to break quadruple DES (say EDED), what is complexity? Like for EDE, it is O(2^112).
I was using a SOCKS5 proxy today (tunneled through SSH) and I began to wonder what the effect of encrypting twice (TLS over encrypted SOCKS5 in this case) would have on the security of the transmitted data. The proxy was using 256-bit AES in CTR mode, while the page I was viewing was using 128-bit AES in GCM mode. Whil...
A long question here, but I really want to motivate why I'm confused. Consider the following attack on the Schnorr Identification Scheme. Alice chooses a random $k$, computes $\gamma = \alpha^k \pmod p$, and sends a message to Bob, containing her certificate and $\gamma$, of her intent to authenticate. Oscar hijacks ...
Prove that the affine cipher over Z26 has perfect secrecy if every key is used with equal probability of 1/312. Just some guidance/help with this problem would be greatly appreciated not sure how to start the proof. Many thanks!
Am I correct in assuming that HMAC_DRBG would return different results if I, e.g. first request 4 bytes followed by a request of another 4 bytes instead of asking for 8 bytes at once? It seems that in NIST SP800-90A chapter 10.1.2.5: Generating Pseudorandom Bits Using HMAC_DRBG first the K and V values are changed, the...
I do the following via the Linux CLI: printf '\xff\xff\xff\xff\xff\xff\xff\xff' > plaintext.txt openssl enc -bf-ecb -e -in plaintext.txt -out ciphertext.txt -nosalt -K FFFFFFFFFFFFFFFF -p I then read the contents of ciphertext.txt with <?= bin2hex(file_get_contents('ciphertext.txt')); ?> and I get this: 5aacfb5a8dc015...
While reading a literature on signature schemes, I came across the concept of Existential Unforgeability of signature scheme against Adaptive Chosen Message Attack. Can anyone point me to the paper where this notion was introduced first? Otherwise, may I ask for a paper/reference where the above-mentioned game is prop...
I came across the following quotes in reading papers on obfuscation (1, ibid, and 2): The next result follows from the fact that point functions are not exactly learnable (since a uniformly chosen point function is statistically indistinguishable from the all-zeroes function given a polynomial number of membership que...
I was just reading these notes on garbled (Yao) circuits and I just stuck trying to figure out how an implementation of Table 1 would work using RSA encryption. In RSA the public key is $(n,e)$. So for the first row, for example, I guess that ${\rm Enc}_{k_1^0}(k_2^0)$ means: "encrypt the "message" $k_2^0$ with the ke...
There are a bunch of papers do research on resizable garbled circuits. But I wonder why garbled circuits cannot be reused? For example, the constructor constructs a garbled circuit of "AND" like this: $E_{K_{u}^0}(E_{K_{v}^0}(K_{w}^0))$, $E_{K_{u}^0}(E_{K_{v}^1}(K_{w}^0))$, $E_{K_{u}^1}(E_{K_{v}^0}(K_{w}^0))$, $E_{K_{u...
In the hashlib module in python is a function called m.update() where m is a hashlib.md5 object. My question, actually not specific to python, is how does this function work, such that: m = hashlib.md5() m.update("hello") m.update(" world") which is the same as if I would have done: a.hashlib.md5() a.update("hello wor...
So I'm reading a chapter in my networking book, and it talks about substitution and transposition ciphers. I know that most network security uses public key or symmetric encryption, but I wonder whether a simple transposition is also used. I ask because I'm not sure how they would quickly decode the message on the othe...
I am a french student and I read the post on the forums (How does one attack a two-time pad (i.e. one time pad with key reuse)?). I need your help if possible. I 'm 11 encrypted messages , all encrypted with the same key. How should I proceed? thank you in advance for your help message encrypted: Message 1: 315c4eeaa8b...
In the definition of functional encryption ($FE$): $FE.Setup(1^k)$ takes as input the security parameter $1^k$ and outputs a master public key $fmpk$ and a master secret key $fmsk$. $FE.KeyGen(fmsk, f)$ takes as input the master secret key $fmsk$ and a function $f$ and outputs a key $sk_f$. $FE.Enc(fmpk,x)$ takes as in...
I have an old sourcecode backup from my DOS days stored in a ZIP 2.0 encrypted archive, but I lost the password. The password was written on a paper slip, but I remember that it consisted of 30+ completely random alphanumeric characters with some special symbols in between. I have read that a GPU cluster will crack old...
With the knowledge of the trapdoor, we are able to compute the same digest for differents messages. I've read that given two messages $m$, $m'$ and two numbers $r$, $r'$ such that $Ch(m,r)=Ch(m',r')$, computed by the owner of the trapdoor, we are able to find other collisions and sometimes we are able to find this tra...
RC4 has a variable length key. Is it still necessary to use a key derivation function, such as PBKDF2, to initialize it? Would using a single character password weaken it's output when compared to a block cipher using, for example, the SHA-256 hash of that same single character password as the key?
Recent fast elliptic curve implementations, for example a presentation at Eurocrypt 2014 (earlier presentation slides, the paper) talks about protection against only timing attacks. Why only timing attacks? If these methods are implemented in hardware then I think it should have been protected against power attack and...
In RSA, the $p$ and $q$ should be randomly generated, and they are the same size. The difference between $p$ and $q$ should not be small. Suppose that $u=|p-q|<20$ and $p \times q =2189284635403183$. Find the values of $p$ and $q$. I have no idea how to compute $p$ and $q$. I use calculator to compute square root of t...
$m$ is arbitrary value in $Z_n$, where n is RSA modulo. Then we do: $r_2=r_1 . m (modn)$, where $r_1$ is a random value such that $r_1\in Z^*_n$. ** Question(1): is $r_2$ a uniformly at random value in $Z_n$? **Question(2): Would this be secure: $r_2=r_1 . m (modn)$ (where $m\in Z_n$ and $r_1\in Z^*_n$ )?
Does google's Crypto.JS AES encryption use PBKDF2 as default? Some references, but I can't figure out the answer myself: https://code.google.com/p/crypto-js/#The_Cipher_Algorithms https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/aes.js
I'm symmetrically encrypting a file (using a random salt and a user supplied password with PKCS5S2, i.e., nothing special) and I need to be able to access it randomly. Therefore I'm using a stream cipher. This works well, but it allows the attacker to verify a wrong password when reading only a tiny part of the file (g...
I know counter mode can be CPA secure, when used with block ciphers modeled as random permutations. If we use pseudo-random permutations, is it still CPA secure? Is there a proof? How about CBC mode? When used with block ciphers modeled as pseudo-random permutations, will it be CPA secure? Again, is there a proof?
If random data is prepended to a file encrypted with GNUPG's symmetric encryption, how may an attacker find out if the input file is deliberately corrupted or the passphrase is wrong? If it is not easily ascertainable from which offset the actual encrypted data starts, is there any added security in always prepending a...
There are some strong studies which support the use of pronounceable passwords and multiple tools which provide generation of such passwords. According to this question the entropy of a password depends on its method of generation but how can I be sure that my generated pronounceable password has enough entropy for my ...
I've read Bellare and Rogaway 2004 and Shoup 2004 about game-based cryptography proofs, but I lack precisions about how should be built the "learning" and "challenge" phases, since my games will probably have this structure. And what are they suppose to provide anyway ? Security against Adaptive adversaries ? The games...
There is an international search for Mersenne Primes. The project is huge. But what is the use of Mersenne Primes in cryptography? Do they have any other properties other than the $2^n-1$ form?
How to make a message into a polynomial? I saw many answers to this question and yes, i know that here are some questions. But i did not get it. I think that i am making some mistakes. I took a word and just convert to binary-and here is my polynomial. I this that it is not correct, i am working with utf-8 (so example ...
I am looking for a Format Preserving Encryption implementation to apply to either a 32-bit or a 64-bit integer. It looks like AES/FFX mode is just what I need in terms of established security properties. However, it looks like it is patented, and it seems like there might be something equally solid in the public doma...
I want to derive a 256 bit encryption key and a 256 bit MAC key from a single 256 bit master key for an authenticated encryption scheme. I was considering the following construction to derive the two keys using a secure 256 bit hash algorithm e.g. Keccak: Key 1 for encryption = H(master key | '0') Key 2 for MAC = H(ma...
Does somebody know a cryptographic/mathematic operation, that needs much computing power to be "encrypted"/"created" but doesn't need much power to be "decrypted"/"solved"?
If a database stores password encrypted by using salt values, how are they stored? I read somewhere, it uses timestamps. So is the timestamp also stored? How about when a user tries to login next time, then how are timestamps considered?
I have a situation in RSA like this. Charles sends same message $m$ to Alice and Bob encrypted with $e_A$ and $e_B$ respectively. It happens that he they are under same modulus $n$ and $gcd(e_A, e_B)=1$. Now Eve intercepts two messages $c_A$ and $c_B$. The claim is that Eve can easily get $m$ in this situation. My thou...
Is the parity of the permutation of the set $\{0,1\}^{128}$, defined by AES encryption for a certain fixed key, dependent on this key? DES, and any pure Feistel cipher, has even parity for any key. That's less clear for AES, and of no practical importance since parity of an arbitrary permutation can not be determined u...
I am a bit lost in understanding what I read on authentication, signature, etc. For instance, is the size of the ECDSA keys produced by ssh-keygen -t ecdsa -b 256 linked to the hash used (SHA256) when computing the signature?
LibSodium, (https://github.com/jedisct1/libsodium), has a function crypto_box_detached() which does authenticated encryption using the public key of the recipient and the private key of the sender (using Curve25519). I believe this function is compatible with Daniel J. Berinstein's corresponding function in NaCl (http:...
The passage said that the computational load to attack DES-X can be reduced to approximately $2^{(56+64)}=2^{120}$ steps,and the storage of data sets should be $2^{64}$. But I can't figure why it is time complexity $2^{120}$ and the (space complexity) of data sets should be $2^{64}$. Can somebody help?
As a preface, I have to say that I am a noob in this area. Having said that, I will ask the question. I have a situation where I need to validate and protect against tampering a handful of large binary files (~1GB each with ~10GB total) distributed on an embedded system (think Android Tablet). These original files wi...
I have now studying the RSA, but I think that is it possible to have some probabilistic version like a random bit string "r" XORed with the key? Is there any probabilistic version of RSA? Thak you so much
What is the encryption method called when pseudo-random numbers are used instead of true random numbers?
Say I start with a 26-letter keyword and convert the letters into 26 integers (A=0, B=1...Z=25) nr[0] to nr[25]. Then I create a stream, nr[26] onwards, with a lagged fibonacci sequence where nr[n]= (sum of nr[n-26] to nr[n-1] )mod 26. And I use the stream to encipher a brief message (no longer than 200 letters) in su...
Say Alice publishes (i.e. all parties in the universe) a key or certificate $x$ and sends a secret $s$ to Bob. Bob then publishes some data $d$ (his identity or a message or smt.) and an authentication of the data using the secret, $auth = mac(d,s)$. Dave can now verify the authenticity of $d$, $verify(auth,x)$, and mu...
I discovered the chinese remainder theorem (CRT) version of RSA cryptosystem which is used in many crypto libraries (OpenSSL, Java...). The use of this theorem improves the speed of decryption so, why is it not always applied? What are the disadvantages of this version which would explain that it's not always implement...
Say that I define a scheme where the salt is public and is MAC-ed with the message: $k = KDF(password, salt)$ $tag = MAC_k(salt || message)$ Is it safe to salt the MAC this way? Assume that the salt is public and can be modified by an attacker.
I'm looking for a function that is generally one way from some secret $F(s, A) \rightarrow Y$, where $A$ is known, $Y$ is produced (also known), and $s$ is kept secret. But whose repeated application results in the function being reversible (to determine $s$) at some step $F_n$. Edit: $A[1,2 \dots n]$ is a set of numb...
I have a series of obfuscated strings which across the set of strings have regions of high variance and regions of low variance – implying some encoding mechanism as opposed to an encryption procedure (or hash function) which would yield a high amount of variance across all strings; or a structure preserving cipher suc...
I'm new to cryptography and have just completed homework on Monoalphabetic cipher. I managed to decrypt the cipher text successfully but I cannot identify the key from my plaintext to ciphertext mapping table which is shown below (top is ciphertext and below in caps is what I have substituted with). No substitution wer...
For Vigenere cipher, I understand Find period first (say we have p = 6) Find highest frequency of letter in each group (from 1 to 6) and assume it is "e" in plaintext What if we have more than one letter with same frequency. For example, "j" and "y" having same frequency in p1 group. Which one should we consider whe...
Classical paper by Groth-Sahai on NIZK proof system is titled as "Efficient Non-interactive Proof Systems for Bilinear Groups". To my understanding, only (Pairing Product Equation) PPE are defined over groups which induces Bilinear map. But, what about (Multi-Scalar Multiplication Equation) MSME/ (Quadratic Equation) Q...
The base scenario goes as follows: A program stores some user's confidential data encrypted on their disk. The user is most probably clueless and the disk might get stolen, but these are the classical problems. Now there's a requirement to allow a sort of remote access without increasing the risk too much. The program ...
I've seen the term "$q$-type assumption" used in a few papers without a definition. A Google search doesn't seem to come up with anything useful either (except the same papers without a definition). Could someone elaborate on what they are and how they compare to static assumptions? Are there some other typical "types"...
I am trying to understand the Boneh-DeMillo-Lipton fault attack on RSA CRT signature. Suppose that we sign a message $m$ with RSA-CRT : $d_p = d \bmod (p-1)$ and $d_q = d \bmod (q-1)$ $s_p = h(m)^{d_p} \bmod p$ and $s_q \not= h(m)^{d_q} \bmod q$ where $h$ is a hash function By CRT we get $s$ the signature modulo $n=pq$...
I am reasonably new to the cryptography. For my use-case I need a method where in I would need a receiver to accept encrypted messages from a range of senders (each having their own, say, public key). My use-case also needs that some of these users only have temporary access which can be revoked externally i.e. without...
I am working on RSA CRT and there is a point that I don't understand : So we have $n=pq$ and $c = m^e \bmod n$ an encrypted message. To decrypt $c$ with RSA CRT, we have to compute : $d_p = d \bmod (p-1)$ and $d_q = d \bmod (q-1)$ Why do we have to do a reduction $\bmod (p-1)$ and not $\bmod p$ ? (Same for $(q-1)$ and ...
I should prove that $a^{\varphi(n)/g} \equiv 1 \pmod{n}$, so I thought I would prove it with primitive roots but I got stuck. Here is the assignment: Let $p, q$ be primes such that $p \ne q$. Denote $n = pq$, $\varphi(n) = (p − 1)(q − 1)$, and $g = gcd(p − 1, q − 1)$. Prove that $$a^{\varphi(n)/g} \equiv 1 \pmod{n} ~ ...