|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello :
I tried to write a simple program in C++ for encrypt a word using a keyword and a key depending on an alphabet ,for example keyword:HELO Key ![]() ABC DEFG HIJKLMNOPQRSTUVWXYZ (English alpabet) XYZ HELO ABCDFGHIJKMNPQRSTUV (cipher alphabet) as seems above the keyword HELO is starting when the the letter D position in the english alphabet, my problem was how to create this cipher alphabet which is depend on the input keyword and the key and the reset letters which not in the keyword must not appear again in the cipher alphabet,,,, Any one can help ??? Thanks in advance.... |
|
#2
|
|||
|
|||
|
Sorry the key is D
thanks |
|
#3
|
||||
|
||||
|
I'm somewhat confused as to what you're trying to do. You want to know how to generate the cipher alphabet without reusing the letters from the key?
__________________
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started. - Why know the ordinary when you can understand the extraordinary? - Sponsor my caffeine addiction! (36.70 USD recieved so far -- Latest donor: Mark Foxvog) |
|
#4
|
||||
|
||||
|
I'm a bit confused, but it looks like you are just trying to implement a Caesar cipher. Is this correct? You may want to google for an explanation.
Or reply with some more of what you are trying to do. |
|
#5
|
|||
|
|||
|
Hello :
Thanks for the replyes, I want to genrate the cipher alphabet by puts the positions of letters of the keyword(HELO) in the cipher alphabet & must be instead of the position of the Key(D) in the orginal alphabet. and then resume the other letters that not exist in the keyword put these letters in the cipher alphabet too .... ABC DEFG HIJKLMNOPQRSTUVWXYZ (English alpabet) XYZ HELO ABCDFGHIJKMNPQRSTUV (cipher alphabet) I tried to enter the alphabet int y=0; for(int x='a';x<='z';x++){ en[y]=x; cout<<en[y]; y++; } puts("Enter the keyword"); gets(keyw); puts("Enter the key"); gets(k); // until know it's OK, but I don't how to generate the cipher alphabet..... Thanks in advance...... |
|
#6
|
||||
|
||||
|
This is a programming question, moved to C/++ from Security.
|
|
#7
|
|||
|
|||
|
This looks like a first year programming assignment. But the problem statement seems to be losing something in translation.
__________________
It's not always a matter of what you can do with a language, but whether you should. [JwD] |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Crypto Algorithm Question - Keyword mixed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|