The given below program will help you to find the calculations :
(ab) % MOD = ((a % MOD)b) % MOD
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int power(int a,int b)
{
if(b==1)
return a;
long int subAns = power(a,b/2)%1451;
if(b&1)
return (((subAns*subAns)%1451)*a)%1451;
return (subAns*subAns)%1451;
}
int main()
{
int ans = (284*power(500,512))%1451;
cout<<ans;
return 0;
}
Step1: Key Creation:
Chooses private key 1 ≤ a ≤ p − 1.
Computes A = g^a(mod p).
Publishes the public key A.
So we have p = 1451.
g = 2 and a = 753.
On calculating this using the above program , we got A = 995 . So private Key for Alice will be 995.
Part B.
i) Chooses plaintext m.
ii) Chooses random ephemeral key k.
iii) Uses BOB’s public key b to compute c1 = g^k(mod p) and c2 = m*b^k (mod p).
iv) Sends ciphertext (c1, c2) to BOB.
For C1 = gk mod p
2512 mod 1451 .
we got C1 = 1185
and C2 = 284*500512 mod 1451 = 1411 .
So , the Cipher Text that will be sent to bob ( 1185 , 1411) .
Step 3.
i ) Calcuate (C1a)-1 x C2 (mod p )
ii) C1 = 332 , C2 = 869 , a = 451 , p = 1451
iii) 869*(332451)-1 mod 1451 . is the required expression.
iv) First Calculate , (332451)-1 mod 1451 , ............ eq (i)
it can be written as A * 332451 mod 1451 = 1
v) So, the value of A for which the LHS = RHS will satisfy is the required mod for eqn i.
So for A = 1088 it is satisfied .
vii) Now , calculate 869*1088 mod 1451 which 871.
So the Message will be 871 .
below the is code for finding A.
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int power(int a,int b)
{
if(b==1)
return a;
long int subAns = power(a,b/2)%1451;
if(b&1)
return (((subAns*subAns)%1451)*a)%1451;
return (subAns*subAns)%1451;
}
int main()
{
for(int i = 1 ; i<=2000 ; i++){
int ans = (i*power(332,451))%1451;
if(ans==1)
{
cout<<i ;
break ;
}
}
return 0;
}
all infor given 4. Supppose Alice and Bob are using the prime p = 1451 and...
Need help!! please explain — crypto math thank you!! 7. Alice and Bob use the ElGamal public key cryptosystem with p 19, and a 3. Bob chooses the secret x = 4, What is β? Alice sends the ciphertext (2.3). What is the message? 8. The points (3, +5) e on the elliptic curve y2-a3 2. Find another poin with rational coordinates on this curve. 9. For the elliptic curve y2--2 (mod 7), calculate (3,2)(5,5) 0. Let P (,0) be...
Alice wants to send a message m to Bob using Rabin Cryptosystem. Bob makes the public key n = 77 and sends it to Alice. By using Rabin Cryptosystem, a) Alice encrypts her message m and sends the encrypted message c to Bob. What are the encrypted messages if m = 8, 36, 41 and 69? b) Alice encrypts her message m = 6 and sends the encrypted message c to Bob. Bob decrypts the message. What are the possible...
2. Alice is a student in CSE20. Having learned about the RSA cryptosystem in class, she decides to set-up her own public key as follows. She chooses the primes p=563 and q = 383, so that the modulus is N = 21 5629. She also chooses the encryption key e-49. She posts the num- bers N = 215629 and e-49 to her website. Bob, who is in love with Alice, desires to send her messages every hour. To do so,...
Question1: Alice and Bob use the Diffie–Hellman key exchange technique with a common prime q = 1 5 7 and a primitive root a = 5. a. If Alice has a private key XA = 15, find her public key YA. b. If Bob has a private key XB = 27, find his public key YB. c. What is the shared secret key between Alice and Bob? Question2: Alice and Bob use the Diffie-Hellman key exchange technique with a common...
(8) In an RSA cryptosystem, Bob’s public key is (n = 629, e = 43). Alice uses this public key to encrypt the word “MARCH” and send the ciphertext to Bob. First, she represents this word in ASCII where the capital letters A, B, C, . . . , X, Y, Z are represented by integers 65, 66, 67, . . . , 88, 89, 90 respectively. Then she encrypts the five integers that represent M, A, R, C, H...
7) (i) You and Bob use Elgamal encryption with p=17 and g=3. You choose your private key a=4 and send A=-4 mod 17 to Bob (-4 is congruent to 3^4 mod 17), and Bob sends you (2,7). What is Bob's message? (ii) Alice and Bob use Elgamal encryption with p=13 and g=2. You noticed that Alice has sent A=11 mod 13 to Bob, and Bob has sent (5,7) to Alice. What is Bob's message?
Answer all of it asap Discrete mathematics Problem 10 (10 pts) Alice and Bob would like to exchange a key using the Diffie-Hellman protocol that uses the following public information: the cyclic group Zio, and 5 as its base element. Alice: If she chooses 3 as her private key, which element does she send to Bob. Bob: If he chooses 4 as his private key, which element does he send to Alice Key-Exchanged: What is their Private Key exchanged. Problem...
Question 4 (5 points) Consider the following scenario: Alice wants to send Bill a message. Alice encrypts some information using Bill's public key; Bill decrypts the ciphertext using his private key. This is an example of: Question 4 options: 1) symmetric encryption 2) digital certificate 3) asymmetric encryption 4) digital signature
your answer. Refer to attack scenarios on mutual authentication protocols that were discussed during the Lecture-7 and Tutorial-7.] 5 Marks] Q5 (OpenSSL and IPFS) Assume that the School of Science of RMIT University is planning to use IPFS-based repository of sensitive files for sharing among staffs. An owner of a particular file, say Alice wants to share the file to her supervisor, say Bob. Therefore, Alice encrypts the file with Alice and Bob's shared AES secret key (KaB) using OpenSSL,...
5. Alice wishes to send the message m4 to Bob using RSA encryption. She looks up Bob's public key and finds that it is (n-55. c= 3 (a) Specify exactly what information Alice sends to Bob (b) What is Bob's private key? Show how he would use it to recover Alice's message (c) Explain why Bob should never use this choice of public key in real life. 5. Alice wishes to send the message m4 to Bob using RSA encryption....