• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

one function required which can encrypt and decrypt the text

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Cryptographic Theory and Cryptanalysis - Internal and Transmission Security

View previous topic :: View next topic  
Author Message
Irfan Ahmed
Just Arrived
Just Arrived


Joined: 12 Jun 2007
Posts: 0


Offline

PostPosted: Tue Jun 12, 2007 10:35 am    Post subject: one function required which can encrypt and decrypt the text Reply with quote

I need to know about any cryptographic algorithm in which we dont need to use separate functions to encrypt and decrypt the text using symmetric key.

Though We can also make a simple function by combinning encryption and decrytpion functions using any switch statement or if-else.But it is not required.

I need to know about any function in which if we pass simple text with key, it encrypts it or vice versa.
Back to top
View user's profile Send private message
Elderan
Just Arrived
Just Arrived


Joined: 08 Jun 2007
Posts: 0


Offline

PostPosted: Tue Jun 12, 2007 12:00 pm    Post subject: Reply with quote

Hi,
Enigma was such an algorithm, but not realy secure.

Using a block cipher would be a problem, and I dont know any block cipher where the encryption also the decryption methode is.

But every (or most?) stream cipher has this property. E.g. you can use RC4, where the encryption routine also the decryption routine is, but RC4 is not recommended for new applications (it's realy hard to use the algorithm so that it is secure).

An other possibility is using a block cipher (e.g. AES) in OFB or CTR mode, which would be my choice.


Stream cipher has the following characterization:
Plaintext ^ Keystream = Ciphertext (Encryption)
but also:
Plaintext = Ciphertext ^ Keystream (Decryption)

^ means XOR, and the keystream has to be the same for encryption/decryption.

Edit:
Replaced chiffre by cipher Wink


Last edited by Elderan on Tue Jun 12, 2007 1:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
Advocate
Just Arrived
Just Arrived


Joined: 31 Aug 2006
Posts: 0
Location: Amsterdam, NL

Offline

PostPosted: Tue Jun 12, 2007 1:00 pm    Post subject: Reply with quote

I'm not really following the line of questionning, but couldnt you use almost any implementation of a Feistel Cipher?


This is a block cipher where the encryption and decryption routine is the same in most cases.

Just as a side note to Elderan, could we use 'cipher' as opposed to 'chiffre' you're mixing language mid sentence and it grates a little Smile
Back to top
View user's profile Send private message
Elderan
Just Arrived
Just Arrived


Joined: 08 Jun 2007
Posts: 0


Offline

PostPosted: Tue Jun 12, 2007 1:49 pm    Post subject: Reply with quote

Hi,
Quote:
This is a block cipher where the encryption and decryption routine is the same in most cases.

Normaly, for encryption you have to use the encryption routine reverse, means e.g. for decryption you add first the last round key and so on.

But I think, Irfan Ahmed, wanted the following:
P: Plaintext
C: Cipher
E(x): Encryption

C = E(P);
P = E(C);
P = E(E(P));

This is, afaik, only with a stream cipher possible (or a block cipher in stream mode), resp. I don't know a block cipher where the encryption routine also the decryption routine is (although the routines are very simular).

PS: Sry, for chiffre and cipher, I'm not a native speaker, and so it's realy hard to change (or avoid) some habits, because the German word for 'block cipher' is 'Blockchiffre'.
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Cryptographic Theory and Cryptanalysis - Internal and Transmission Security All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register