Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Encryption – The Basics

encryption

  • Please log in to reply
20 replies to this topic

#13 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 07 June 2008 - 05:36 AM

That would be shooting in the dark.
  • 0

God is real... unless declared an integer

my blog :: http://techarraz.com/


#14 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 07 June 2008 - 06:22 AM

He he... you might still hit though :)
  • 0

#15 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 07 June 2008 - 06:41 AM

Oh, ya just a 75 degree of temperature generated over 4 continuous days and you ll hit somwhere with your processor atleast! Hit the building!lol.
  • 0

God is real... unless declared an integer

my blog :: http://techarraz.com/


#16 CallBackGuy

CallBackGuy

    CC Newcomer

  • Just Joined
  • PipPip
  • 21 posts

Posted 08 March 2009 - 02:08 AM

I wrote this little program. Is it considered encryption or encoding?
It replaces each sub-string in a string with its alphabetic position.
import sys
alpha=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

def decrypt():

string=raw_input("Enter string to be decrypted: ")
nums=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26"]
x=len(nums)-1
while x >= 0:
string=string.replace(nums[x],alpha[x])
x=x-1
print string.replace(" ","")
sys.exit()

def encrypt():

string=raw_input("Enter string to be encrypted: ")
x=len(alpha)-1
while x >= 0:
string=string.replace(alpha[x],str(x+1)+" ")
x=x-1
print string
sys.exit()

choice=raw_input("Decrypt[1] / Encrypt[2]: ")
if choice == "1":
decrypt()
elif choice == "2":
encrypt()
else:
print "Invalid input."

  • 0

#17 sheva249

sheva249

    CC Lurker

  • Just Joined
  • Pip
  • 5 posts

Posted 08 April 2010 - 09:45 PM

I have never learned these algo in such easier way. So plz accept my best wishes for the cool writing style. As I am a newbie in the security field, these posts are improving my level.
  • 0

#18 sandeep.ellawala

sandeep.ellawala

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 03 May 2010 - 07:01 AM

This is very basic, yet interesting. It surely inspired me to go and take that book on encryption right off of my book shelf for the first time since I bought it and left there on the shelf. I am going to read it and see if I can implement a few algorithms in Java. Nice post by the way.
  • 0

#19 grisha

grisha

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 106 posts
  • Location:Poland
  • Programming Language:C, C++, C#, PHP, JavaScript

Posted 03 May 2010 - 09:25 AM

The artcile is quite good. I would put some bibliography here (in fact I would put it in all tutorials), so many people can have a good start with some topics. For this one I would recommend:

C. Paar, J. Pelzl, Understanding Cryptography, Springer 2010, ISBN: 978-3-642-04100-6

You can always check your library, or look over for it in the internet :)
  • 0

#20 null

null

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 128 posts

Posted 18 May 2011 - 10:34 PM

I believe the real term for shifter is called an Exclusive OR.
  • 0

#21 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 18 May 2011 - 10:43 PM

I believe the real term for shifter is called an Exclusive OR.

It would be considered a (non-wrapping, case insensitive) rotating encoding, i.e. rotate alphabet by 1, this is often done in 13 shifts (rot13 encoding)

Exclusive OR (XOR) on the other hand is a bitwise operation where one of two bits in a pair has to be exclusively set, otherwise the bit is turned off.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.






Also tagged with one or more of these keywords: encryption

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download