C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 4th, 2008, 05:10 AM
JohnSA JohnSA is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 3 JohnSA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 41 sec
Reputation Power: 0
Post Crypto Algorithm Question - Keyword mixed

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....

Reply With Quote
  #2  
Old April 4th, 2008, 05:14 AM
JohnSA JohnSA is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 3 JohnSA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 41 sec
Reputation Power: 0
Sorry the key is D
thanks

Reply With Quote
  #3  
Old April 4th, 2008, 06:59 PM
B-Con's Avatar
B-Con B-Con is offline
Crypto-Con
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Apr 2004
Location: UC Davis
Posts: 6,663 B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 5 Days 20 h 30 m 47 sec
Reputation Power: 879
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
)

Reply With Quote
  #4  
Old April 4th, 2008, 09:48 PM
fishtoprecords's Avatar
fishtoprecords fishtoprecords is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Sep 2007
Location: outside Washington DC
Posts: 1,267 fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)fishtoprecords User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 28001 Folding Title: Starter FolderFolding Points: 28001 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 22 h 16 m 2 sec
Reputation Power: 658
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.

Reply With Quote
  #5  
Old April 5th, 2008, 05:26 AM
JohnSA JohnSA is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 3 JohnSA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 41 sec
Reputation Power: 0
Lightbulb re:

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......

Reply With Quote
  #6  
Old April 5th, 2008, 04:19 PM
B-Con's Avatar
B-Con B-Con is offline
Crypto-Con
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Apr 2004
Location: UC Davis
Posts: 6,663 B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 5 Days 20 h 30 m 47 sec
Reputation Power: 879
This is a programming question, moved to C/++ from Security.

Reply With Quote
  #7  
Old April 5th, 2008, 05:00 PM
jwdonahue jwdonahue is offline
Bellevue WA, USA
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2004
Location: Bellevue Washington, USA
Posts: 1,038 jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level)jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level)jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level)jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level)jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level)jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level)jwdonahue User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 23 h 14 m 51 sec
Reputation Power: 66
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]

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Crypto Algorithm Question - Keyword mixed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT