Jump to content
The mkiv Supra Owners Club

Serious help needed, anybody in london good at algorithms and encryting/decrypting.


adnanshah247

Recommended Posts

Guys im badly stuck on a coursework assignment of mine for uni. its within my IT Security module and i have to basically know about these things in detail. i have read and read and cant make sense of it at all. these are some aspects:-

 

*Public and private key ciphers

*Euclidean algorithm's

*RSA Cipher

 

has driven me insane for the last few days. anybody willing to offer me some tuition, will obviously pay for all time taken :(

 

PLEASE HELP GUYS!

 

This is my coursework assignment and honestly i have no idea what the hell im doing:-

 

QUESTION 1 (35 MARKS)

 

Let p = 1889, q = 2003, and e = 61.

Show that (e, n) defines a valid public key pair for an RSA cipher system.

Determine the corresponding private key pair (d, n), and the block size for encryption.

Encrypt:

DIGITAL FORTRESS

 

[ Hint: Use MS Excell for your calculations ]

 

Explain your answers.

 

 

QUESTION 2 (30 MARKS)

 

Given the initial 8-bit LFSR [ 01101100 ], and the primitive polynomial

x^7 + x^6 + 1.

1. Use the corresponding stream cipher to encrypt the word: PRIVACY.

2. Use the same stream cipher to decrypt the ciphertext : 11000 10101 01011

(Hint: The English alphabet characters are to be represented by 5-bit binary of their numerical order:

A= 00001, B= 00010, C= 00011, ..., Z= 11010, and space = 00000).

Explain your answers

 

 

 

QUESTION 3 (35 MARKS)

 

Apply the DES round function with the plaintext block

P = 1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 0111

Using the subkey:

Ki = 101010 100011 010011 110011 101011 110101 010110 000101

Link to comment
Share on other sites

You're a joker Adnan. lol. I am an econmist by nature, sorry so cant help.

 

When's it in for? (Gosh not said that for years!)

 

That looks very very complicated! BTW won't your lecturer be able to google this and see your name next to it ?

 

mate it blooody well is! i foooking hate ciphers and algorithms.

Link to comment
Share on other sites

Thats all very well Ad and we will get to your little problem in due time but we all know the real question that people have sought the answer to and thus far have been left wanting is this. What does the red button do?

 

I don't know mate, can't you write a few pages of absolute non-sensical (GUTRHj uiOIO OUITYHOI IIYRE NJH) jargon on the answer sheet and then tell the examiners that if they are so smart they should be able to crack your code too?

Link to comment
Share on other sites

Just put 42 down for every answer. Or perhaps go back and read your course notes?

 

im on a 1st at the moment in my degree and however much i have struggled have managed to understand what im going but this is just a really next level dilemma. i have read and read my notes but cant put it into context :(

 

 

 

thank you so much, really appreciate it

 

Thats all very well Ad and we will get to your little problem in due time but we all know the real question that people have sought the answer to and thus far have been left wanting is this. What does the red button do?

 

I don't know mate, can't you write a few pages of absolute non-sensical (GUTRHj uiOIO OUITYHOI IIYRE NJH) jargon on the answer sheet and then tell the examiners that if they are so smart they should be able to crack your code too?

 

the lecturers are class A w@nkers. they 'no offence' are all outside of the UK and their english is at times very hard to understand, especially when they explain stuff like this, they wiz through it and expect us to magically understand it all!

Link to comment
Share on other sites

Ok, i'm gonna have a crack at question 1 myself, I have never done RSA encryption and haven't touched algebra or functions since A-Level maths :)

 

p = 1889

q = 2003

e = 61

n = modulus for both public + private key = pq = 1889x2003 = 3783667

totient = φ(pq) = (p − 1)(q − 1).

totient = φ(pq) = (p − 1)(q − 1) = (1888)x(2002) = 3779776

 

going by this:

Choose an integer e such that 1

 

so 1

so 1

 

φ(pq) = number of positive integers less than or equal to (pq), I assume as you're doing a degree in either computer science or cryptography that you know how to calculate a totient, I'm at work and on a conference call so don't have the time to work that value out) as you will have to check that both 61 and φ(pq) are both coprime numbers

 

Anyway, (e, n) = (61, 3783667) = 230803687 public key pair... i think, you'll have to check.

 

To determine d, de is defined as 1 (mod φ(pq))

To check that d is correct you can do ((ed) -1)/ φ((p-1)(q-1)) will give a whole number

d is the private key exponent

 

Public key is derived from the modulus n and the public exponent e

Private key is derived from the modulus n and the private exponent d (as worked out with above forumlae)

 

Block size for encryption will be the storage size required to store the integer of the private and public keys. Probably 1024 or 2048-bit. Unless this is quite noddy which it seems to be with a low value of p, q and e from what I can find.

 

Ok so now encryption... I am assuming you need to turn DIGITAL FORTRESS into an integer to transmit it

 

I assume you're also going to use a padding scheme?? So that you and the target intendee know how to encrypt text?

 

So, you turn your message DIGITAL FORTRESS into an integer value, 'm' , where 0

 

To then decrypt 'c' at the target you would then do m = c^d (mod n)

 

So you are using the cipher text to the power of the exponent d and modulus of n and should then derive the same number m that was ciphered, in turn that'd then be translated back to text with the padding scheme.

 

BTW tell them RSA sucks and they should use at least Triple-DES encryption or 128-bit AES. And that e is a sucky value at 61.

 

I'll let you know if my friend gets back to me, but this was my partial attempt at Q1 without pen, paper or a scientific calculator to hand.

 

EDIT : WTF sort of mickey mouse s*** suggestion is it to use Excel for calculations??

Link to comment
Share on other sites

Ok, i'm gonna have a crack at question 1 myself, I have never done RSA encryption and haven't touched algebra or functions since A-Level maths :)

 

p = 1889

q = 2003

e = 61

n = modulus for both public + private key = pq = 1889x2003 = 378667

totient = φ(pq) = (p − 1)(q − 1).

totient = φ(pq) = (p − 1)(q − 1) = (1888)x(2002) = 3779776

 

going by this:

Choose an integer e such that 1

 

so 1

so 1

 

φ(pq) = number of positive integers less than or equal to (pq), I assume as you're doing a degree in either computer science or cryptography that you know how to calculate a totient, I'm at work and on a conference call so don't have the time to work tha tavlue out) as you will have to check that both 61 and φ(pq) are both coprime numbers

 

Anyway, (e, n) = (61, 378667) = 23098687 public key pair... i think, you'll have to check.

 

To determine d, de is defined as 1 (mod φ(pq))

To check that d is correct you can do ((ed) -1)/ φ((p-1)(q-1)) will give a whole number

d is the private key exponent

 

Public key is derived from the modulus n and the public exponent e

Private key is derived from the modulus n and the private exponent d (as worked out with above forumlae)

 

Block size for encryption will be the storage size required to store the integer of the private and public keys. Probably 1024 or 2048-bit. Unless this is quite noddy which it seems to be with a low value of p, q and e from what I can find.

 

Ok so now encryption... I am assuming you need to turn DIGITAL FORTRESS into an integer to transmit it

 

I assume you're also going to use a padding scheme?? So that you and the target intendee know how to encrypt text?

 

So, you turn your message DIGITAL FORTRESS into an integer value, 'm' , where 0

 

To then decrypt 'c' at the target you would then do m = c^d (mod n)

 

So you are using the cipher text to the power of the exponent d and modulus of n and should then derive the same number m that was ciphered, in turn that'd then be translated back to text with the padding scheme.

 

BTW tell them RSA sucks and they should use at least Triple-DES encryption or 128-bit AES. And that e is a sucky value at 61.

 

I'll let you know if my friend gets back to me, but this was my partial attempt at Q1 without pen, paper or a scientific calculator to hand.

 

EDIT : WTF sort of mickey mouse s*** suggestion is it to use Excel for calculations??

 

:blink::blink:

 

How, what....need an over the head smiley big time. :D

Link to comment
Share on other sites

Ok, i'm gonna have a crack at question 1 myself, I have never done RSA encryption and haven't touched algebra or functions since A-Level maths :)

 

dude can you please check your figure for 'n' as i got 3783667 and you got 378667. seems like 1 digit is missed :search:

 

 

im really lost here dude. this is the format we have to use in order to do the answer (were using euclidien tables):

 

QUESTION 1

 

Q1_n =

Replace this text with your answer, e.g. 123456

***

 

Q1_phi =

Replace this text with your answer, e.g. 123456

***

 

Q1_Euclidean=

 

i d(i) k(i) x(i)

0 ... ... ...

1 ... ... ...

2 ... ... ...

3 ... ... ...

4 ... ... ...

5 ... ... ...

6 ... ... ...

7 ... ... ...

8 ... ... ...

9 ... ... ...

10 ... ... ...

***

 

Q1_d =

Replace this text with your private RSA key (d), e.g. 1234567

***

Q1_bs =

Replace this text with your block size, e.g. 3

***

 

Q1_Encryption=

Plain x x^2 mod n x^4 mod n x^8 mod n x^16 mod n x^32 mod n ... ... ... ...

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

... 0 0 0 0 0 0 0 0 0 0

 

***

Q1_C =

Replace this text with your RSA cipher-text, e.g. 1234 # 1234 # 1234 # 1234 # 1234

***

Q1_comments

Replace this text with your comments and explanations

***

Link to comment
Share on other sites

dude can you please check your figure for 'n' as i got 3783667 and you got 378667. seems like 1 digit is missed :search:

 

You are indeed correct and well spotted of my deliberate mistake. Ahem.

 

My laptop keyboard has gone a bit wonky ever since it drank half a red bull. It's fine in the mornings but when the laptop heats up it seems to get a bit sticky keyboard wise for some reason :D

 

Edit : therefore the public key value is also wrong, which I'll now go back and edit. the value did seem a little weak.

Link to comment
Share on other sites

dude how the hell do you work out the block size of a message using RSA? thats the thing confusing me and my friend the most here!

 

The block size is the size you require to fit in both the public key and private key values. so for instance how many values could you fit into a 16-bit address size if you had to encode alpha-numeric values into it?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. You might also be interested in our Guidelines, Privacy Policy and Terms of Use.