eHow launches Android app: Get the best of eHow on the go.

How To

How to Use Bit Shifting in Cryptography

Contributor
By eHow Contributing Writer
(0 Ratings)

When you're sending an electronic message that you don't want anyone else to read, secure it with some form of encryption. The more complex you make the encryption scheme, the more difficult it is to decode your message. You can make a basic encryption scheme using the following bit shift technique.

From Quick Guide: File Encryption Guide
Difficulty: Moderate
Instructions
  1. Step 1

    Choose the length of the blocks into which you will divide your message. For example, let's say you want to divide your message into eight-bit blocks.

  2. Step 2

    Decide on an encryption method. There are a range of methods that people have discovered already. If you don't want to study cryptography, select a known method. Assume that you're using a simple eight-bit encryption key.

  3. Step 3

    Select a value for the encryption key. For example, use 10100111.

  4. Step 4

    Encrypt the message by performing an exclusive-or operation on the first set of bits using the encryption key you chose in Step 3. For this example, if the first set of message bits is 01001000, then you'll get 11101111 as the result of the exclusive-or.

  5. Step 5

    Use a bit shift (eight places, in this case) to output the first block of encrypted message and to set in place the next block for encryption using the procedure in Step 4. Repeat until you've encrypted the entire message.

  6. Step 6

    Remove the encryption by performing Steps 4 and 5 on the encrypted message. You can use the same bit shift and exclusive-or procedure to both encrypt the plain message and to decipher the encrypted message.

Tips & Warnings
  • You can make the encryption scheme complex or simple. The potential for someone to crack your code is proportional to its simplicity. The procedure outlined here is a fairly simple encryption system.
  • There are plenty of people out there who have the ability to break encryption schemes. You shouldn't use a simple scheme to protect sensitive information. Use an established scheme instead.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics