Simple encryption algorithm

Hi there,
Where can i find a very simple encryption algorithm to allow me to encrypt basic strings?
It should be simple enough so i can make a version for Java and Cobol.
Thanks for any help.

I guess you can implement any encryption algorithm with either language. XOR should suffice... just not ROT13, it'll be a pain with EBCDIC. XOR each byte with some byte you randomly picked.

Similar Messages

  • What is the best encryption algorithm to use on a Mac

    If I'm using a program like cryptor-1.51, what is most reliable encryption algorithm I could use with it?

    Ask the developer. BTW, they claim you can use Blowfish, RC2, RC4, RC5, DES, and AES
    (128,192 and 256-bit) encryption schemes.

  • No available encryption algorithms in my ASA

    Hi all,
    I have a cisco asa 5510 running ver 8.02, when i navigate to "remote access vpn-> advanced->ssl settings" i could not see any available algorithms under encryption section. How can i add the encryption algorithm in? I need the encryption algorithm as i want to enable ssl authentication using cert on my asa interface. Pls advise. Thk you.

    Hi Don,
    What exactly are you looking for?
    The ASA base license does allow two simultaneous SSL sessions and you do not need any extra license to achieve certificate authentication.
    In order to allow certificate authentication per connection profile:
    Please check this document for further reference:
    AnyConnect Certificate Based Authentication.
    HTH.
    Portu.
    Please rate any helpful posts

  • Simple compression algorithm / java & c++ code

    We have a java application that sends data back and forth over the internet to a c++ application. the packet sizes are small (30-250 bytes) but many packets are sent back and forth daily. we will be significantly increasing the number of clients where bandwidth utilization will noticably increase
    If anyone can point me to some code (java & c++) with employs a very simple compression algorithm, preferrably something turnkey like
    compressData(strString);
    uncompressData(strString);
    I have looked but cant find anything that is for java & c++ and what i found I dont know if it is fast enough for my purposes. it needs to be fast since each second 30-50 packets may be sent/received per application
    any recommendations or advice? thank you

    Interesting... i never considered this.... the packets are very small... in fact the 250 byte packets are when i store packets and dump them every 250ms or so. I really can't go any slower than 250ms, so 250-300bytes will cover 98% of all data
    do you know if the packet size is based upon some "standard" of tcp/ip protocol or is it configurable somehow?
    Compression isn't going to help much. I believe 250
    bytes is small enough that it will fit in one TCPIP
    packet. Making it less bytes isn't going to gain you
    much. The actual byte transmission time is going to
    be swamped by network and TCPIP overhead.

  • Simple encryption method

    Hey i am trying to create a simple encryption. This is my function.
    public static String Crypt(String sData)
    byte[] bytes = sData.getBytes();
    for(int i=0; i<bytes.length; i++)
    bytes[i] ^= 477;
    return (new String(bytes));
    Unfortunately the String that is returned has a lot of "???????" in it. I have also tried char arrays but to no effect. I want to be able to send the data using a socket therefore i need it in a char array or string. Can anyone help please?

    >
    return (new String(bytes));
    Unfortunately the String that is returned has a lot of
    "???????" in it. I have also tried char arrays but to
    no effect. I want to be able to send the data using a
    socket therefore i need it in a char array or string.1) Not all byte and byte combinations produce a valid String object so one cannot use 'new String(bytes)' with the certainty of being able to reverse the operation and get back the original bytes. i.e.
    new String(some bytes).getBytes() usually does not return 'some bytes'.
    2) You don't need to have a char array or string to send bytes down a Socket. Just send down the encrypted bytes.
    3) I hope you are not considering this encryption method for an industrial strength application!

  • Encryption algorithms used in SQL Compact Edition 3.5

    Hi,
    In the info for SQL Compact Edition 3.5 it states that one of the features is:
    Support for newer and more secure encryption algorithms.
    I can't seem to find details of exactly what these new, more secure algorithms are. It appears 3.1 used 128-bit RSA. Is this the same in 3.5, or has this changed?
    Thanks

    The official word is now out here: http://209.34.241.67/laxmi/archive/2008/04/15/sql-server-compact-database-file-security.aspx

  • Is it possible to use multiple encryption algorithms in Oracle 10g RAC?

    We have two separate databases on same physical servers, running 10g RAC Using TDE, is it possible to have different encryption algorithms for each database?

    It is possible to have every column in a single table use a different algorithm.
    Take a look in Morgan's Library (www.morganslibrary.org/library.html) under
    Wallet
    Transparent Data Encryption
    SecureFiles
    DBMS_CRYPTO
    and perhaps a few other topics.

  • How to provide parameter to an encryption algorithm using PeopleSoft PET

    Hi, using the PET (pluggable encryption technology) framework. how can we provide parameter values to an encryption algorithm where this algorithm itself is a parameter?
    For eg., for pkcs7_encrypted_encrypt algorithm (openssl), PeopleBooks (for pt8.51) shows that the second parameter is a symmetric algorithm. But this symmetric algorithm expects 2 parameters. But how can we provide these parameters while creating the encryption profile?
    Any information will be a great help!!
    Regards
    Srini P

    Hi,
    Any help, suggestions on this will really help.
    Thanks
    Srini

  • FileVault, UnBitLocker, Security, stolen encryption algorithms

    It's in the news, that researchers have discovered a way to extract the encryption algorithms from DRAM chips. This affects the security of FileVault.
    The technical paper is here:
    http://citp.princeton.edu.nyud.net/pub/coldboot.pdf
    FileVault info is on page 16.
    But in order to steal this info:
    1- thieves must have physical access to the computer
    2- one way is through a quick re-boot using an external device
    This just shows that if you have sensitive information on your computer:
    1- don't leave it where thieves can easily steal it (in your car, on a table in a coffee shop)
    2- use a firmware password, which will hinder a boot from another device
    To learn how to add a firmware password, read this article:
    *Setting up firmware password protection in Mac OS X*
    http://docs.info.apple.com/article.html?artnum=106482
    Bottom line: Nothing is absolutely secure.

    This is crazy but obvious. I reviewed the Dept. Of Justice's procedure for what to do if law enforcement encounters a computer that is running but passworded. It says to not touch and call for help. So the DOJ knew about this all along.
    I a called apple support, they acknowledged it but said it is unlike it will be fixed.

  • Simple Encryption

    Hi All, I want to encrypt a simple text as given in the example below BUT I am getting 'java.lang.NoSuchMethodError' Exception at the Cipher.getInstance("DES") method.
    Please help me or give me some references.
    Write me at [email protected]
    This is the test code -
    Cipher desCipher;
    byte[] desKeyData = { (byte)0x01, (byte)0x02, (byte)0x03,..};
    SecretKeySpec desKey = new SecretKeySpec(desKeyData, "DES");
    // Getting Exception at this point
    desCipher = Cipher.getInstance("DES");
    desCipher.init(Cipher.ENCRYPT_MODE, desKey);
    // Our cleartext
    byte[] cleartext = "This is just an example".getBytes();
    // Encrypt the cleartext
    byte[] ciphertext = desCipher.doFinal(cleartext);
    // Initialize the same cipher for decryption
    desCipher.init(Cipher.DECRYPT_MODE, desKey);
    // Decrypt the ciphertext
    byte[] cleartext1 = desCipher.doFinal(ciphertext);

    try this:
    import javax.crypto.Cipher;
    import javax.crypto.CipherInputStream;
    import javax.crypto.CipherOutputStream;
    import javax.crypto.SealedObject;
    import java.security.*;
    import java.io.*;
    import javax.crypto.*;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    import javax.crypto.KeyAgreement;
    import javax.swing.*;
    public class encryptTest
    public static void main(String args[])
    String password = JOptionPane.showInputDialog(null,"Plz Enter Any word to Encrypt");
    Security.addProvider(new com.sun.crypto.provider.SunJCE());
    try
    KeyGenerator kg = KeyGenerator.getInstance("DES");
    Key key = kg.generateKey();
    Cipher cipher = Cipher.getInstance("DES");
    cipher.init(Cipher.ENCRYPT_MODE,key);
    byte[] encrypted_password = cipher.doFinal(password.getBytes());
    JOptionPane.showMessageDialog(null,"Encrypted Password "+ new String(encrypted_password));
    cipher.init(Cipher.DECRYPT_MODE,key);
    byte[] decrypted_password = cipher.doFinal(encrypted_password);
    JOptionPane.showMessageDialog(null,"Decrypted Password "+new String(decrypted_password));
    catch(NoSuchAlgorithmException nsae)
    System.out.println("No Such Algorithm Exception " + nsae.getMessage());
    catch(NoSuchPaddingException nspe)
    System.out.println("No Such Padding Exception " + nspe.getMessage());
    catch(InvalidKeyException ike)
    System.out.println("Invalid Key Exception " + ike.getMessage());
    catch(IllegalStateException ise)
    System.out.println("Illegal State Exception " + ise.getMessage());
    catch(IllegalBlockSizeException ibse)
    System.out.println("Illegal Block Size Exception " + ibse.getMessage());
    catch(BadPaddingException bpe)
    System.out.println("Bad Padding Exception " + bpe.getMessage());

  • Simple encryption... need help...

    hello friends,
    this may be a simple problem, but, as i m new plz forgive me...
    i have to accept three command line agrumetns like...
    name ---> string
    age ---> integer
    date ---> string
    now, i want to encrypt these data in a two different text files with two different encryption methods...
    and later i need to decrypt the data from both the textfiles...
    can anyone help me how can i achieve this task ???
    Thanks,
    Rohan

    hi arshad,
    thanks for the guidence...
    i just needed the proper direction... not the code...
    Thanks again...
    i went through some books and tried a sample code from a book...
    here is the code...
    package des;
    import java.io.*;
    import java.security.*;
    import javax.crypto.*;
    import sun.misc.*;
    * @author Rohan.Nakar
    public class SecretWriting
         public static void main(String[] args) throws Exception
              //checking argumetns
              if(args.length < 2)
                   System.out.println("Usage: SecureWriting -e | -d plainText");
                   return;
              //get or create key
              Key key;
              try
                   ObjectInputStream in = new ObjectInputStream( new FileInputStream("SecretKey.ser"));
                   key = (Key)in.readObject();
                   in.close();
              catch (FileNotFoundException fnfe)
                   KeyGenerator generator = KeyGenerator.getInstance("DES");
                   generator.init(new SecureRandom());
                   key = generator.generateKey();
                   ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream("SecretKey.ser"));
                   out.writeObject(key);
                   out.close();
              //get a cipher object
              Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
              //Encrypt or decrypt the input string
              if (args[0].indexOf("e") != -1)
                   cipher.init(Cipher.ENCRYPT_MODE, key);
                   String amalgam = args[1];
                   for(int i = 2; i < args.length; i++)
                        amalgam += " " + args;
                   byte[] stringBytes = amalgam.getBytes("UTF8");
                   byte[] raw = cipher.doFinal(stringBytes);
                   BASE64Encoder encoder = new BASE64Encoder();
                   String base64 = encoder.encode(raw);
                   System.out.println(base64);
              else if (args[0].indexOf("d") != -1)
                   cipher.init(Cipher.DECRYPT_MODE, key);
                   BASE64Decoder decoder = new BASE64Decoder();
                   byte[] raw = decoder.decodeBuffer(args[1]);
                   byte[] stringBytes = cipher.doFinal(raw);
                   String result = new String(stringBytes, "UTF8");
                   System.out.println(result);
    this is giving me an exception...
    java.security.NoSuchAlgorithmException: Algorithm DES not available
         at javax.crypto.SunJCE_b.a(DashoA6275)
         at javax.crypto.KeyGenerator.getInstance(DashoA6275)
         at des.SecretWriting.main(SecretWriting.java:40)
    Exception in thread "main"
    any help...
    Thanks in advance...

  • Public key encryption algorithm for files

    Is there a public key algorithm
    good for encrypting files (large ones)
    or should I stick to secret
    keys for that?
    Thanks.

    There is no good way to encrypt larga data amounts using public key.
    The way to do this is to generate a random key for a symetric algorithm (like DES), encrypt the file with tis file, cipher the symetric key with the asymetric key and append the result to the ciphered file.
    Good luck

  • Simple Encryption and Simple Question

    Anyway, I hope it is simple!
    This is from an example in my text book, I have coded it up and it works great. I think I understand everything except for the subtraction of 'A' in the encryptMessage method. Any ideas? I thought it may be subtracting the ASCII value of 'A', but isn't that just 1?
    Any help is appreciated.
    public class CeasarCryptography
         public static final int ALPHASIZE = 26; //Standard English alphabet size, ALL uppercase
         public static char[] alpha = {'A','C','B','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
         protected char[] encryptionKey = new char[ALPHASIZE];
         protected char[] decryptionKey = new char[ALPHASIZE];
         public CeasarCryptography()
                   //Initializes encryptionArray
                   for (int x = 0; x < encryptionKey.length; x++)
                             encryptionKey[x] = alpha[ (x + 3) % ALPHASIZE ]; //Rotate alphabet by three places
                   //Initializes encryptionArray and decryptionArray
                   for (int x = 0; x < decryptionKey.length; x++)
                             decryptionKey[encryptionKey[x] - 'A'] = alpha[x]; //Decypt is revers of encrypt
         public String encryptMessage(String secret)
                   char[] mess = secret.toCharArray(); //First, place the string in an array
                   for (int x = 0; x < mess.length; x++)
                             if (Character.isUpperCase(mess[x]))
                                       mess[x] = encryptionKey[mess[x] - 'A'];
                   return new String(mess);
         public String decryptMessage(String secret)
                   char[] mess = secret.toCharArray();
                   for (int x = 0; x < mess.length; x++)
                             if (Character.isUpperCase(mess[x]))
                                       mess[x] = decryptionKey[mess[x] - 'A'];
                   return new String(mess);
         public static void main(String[] args)
                   CeasarCryptography cipherObject = new CeasarCryptography();
                   System.out.println("Welcome to the oldest known enryption program.");
                   System.out.println("\tEncryption Key: " + new String(cipherObject.encryptionKey));
                   System.out.println("\tDecryption Key: " + new String(cipherObject.decryptionKey));               
                   String testString = "JAVA IS NOT EASY";
                   System.out.println("\nEncrypt the following: " + testString);
                   System.out.println("\tOnce encrypted: " + cipherObject.decryptMessage(testString));
    }

    If the value of 'A' is not important, how is 'D' -
    'A' 3? Because D is 3 later than A. So whether 'A' is -123 or 0 or 1 or 65, 'A' + 3 is always 'D'.
    Or is this D (which is the 4th letter) minus A
    (which is the 1st letter) for 4-1 = 3. Right. It's just that in ASCII, 'A' is 65, instead of 1 or 0 that we usually think of it. The whole minus 'A' part is just to say "how far away from A are we, and therfore how much are we shifting?"
    And 3 is the
    element in the Array that D is in?I was winging it here but that's what it comes down to. Whether it's an index into an array where 'A' is in 0, 'B' is in '1', etc., or just an on-the-fly shifting, either way, "minus 'A'" ultimately means "How far away from A is this letter?"

  • Simple encryption question

    i have a very simple user authentication system, where user info is stored in a flat text file on the server. I want to encrypt the password so that it's not stored in plain text, but I can't understand any of the tutorials about security and encryption...is there any way that I can just use a class (or a few) to encrypt the password in the file, then encrypt submitted passwords & check if they match (rather than dealing wiht public and private keys and all that jazz)
    thanks a lot
    Laz

    Instead of encrypting the password you should calculate message digest (i.e. MD5 or SHA).
      java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA");
      md.update( password.getBytes());
      byte[] digest = md.digest();

  • Mail Signing and Encryption Algorithms

    Hi,
    Is there a way to select which algorithms are used for signing and encryption when using S/MIME with the Mac Mail app?
    Thanks and regards,
    Phil.

    Hi Abhay
    Probably the issue is with the public keys which are stored in both the XI boxes , as both the keys will be same .
    Also check digital signatures which are maintained .
    Regards
    Ninad

Maybe you are looking for

  • I forgot my passcode on my new Iphone 6 and haven't backup it yet. Please help.

    I got my Iphone 6 last week and went on vacation to take some pictures. However, in the middle of my vacation the IPhone restarted by itself and asking for a passcode. My passcode is not working anymore and pushing my Iphone to be disabled by trying

  • Yosemite upgrade - problem with login screen

    I've upgraded to yosemite yesterday and now I can't login to my user account - I have login screen with Upgrade needed and Guest User. When I click Guest user I have only Safari available. Macbook Pro, late 2011, Yosemite (10.10)

  • Can't import/play songs after rebuilding machine

    i can't import or play half of the music i purchased from itunes after wiping my machine and installing windows 7. my default music folder is on an external hard drive so i didn't think i had to worry about losing anything since i didn't change anyth

  • Problem with FTPS

    Hi all, I have a File (SAP) to File (SAP) scenario. Now, i process my message with FTP protocol but i need to process with FTPS (SSL/TLS) . Basis & Linux team tell me that It is neccesary add an exception into our firewall to permit the secure conexi

  • DUAL causes internal error ORA-00600

    Hi All, I am using oracle 10g database agains Forms6i, but in forms pl/sql when ever and where ever I use the DUAL in select statement i.e. SELECT sysdate INTO <variable> FROM DUAL; it always causes oracle internal error ORA-00600 ? However it the du