Help  with DES  decryption

Hello !
I wrote the code for DES Encryption , which i have tested and works perfectly, consistent with the results expected.
But I have not been able to implement the decryption process correctly asI have not yet understood the way i need to shift the order of keys , or their elements.I tried reversing the left shifting sequence , but it didn't solve the problem
Please suggest something .I just need to understand the exact process used for decryption.
Many Thanks..

@dstuz
I haven't been reinventing the wheel , but I have been working out the DES code on my own.
I have already coded the application for encryption & it works perfectly- thoroughly verified.
Now since i have been looking to finish the cipher by implementing the Decryption stage..i am stuck because there isn't enough info available to actually clarify my doubt.Some variation has to be made in the way we apply keys to the Right Expanded array but i haven't quite figured out how..
I can do the coding on my own..infact 90% of the coding is finished
FYI.
Its just this last step , where i have been stuck , trying to figure out how the last step is to be done.
I just need help to exactly understand the process & lend the finishing touch to the cipher.

Similar Messages

  • Help with substitution decryption plz!!

    Hi there,
    I'm relatively new to developing with Java, and as a piece of work I have to decrypt a cipher text (which is quite long, near 11,500 characters) that has been encrypted with substitution and is in english.
    It consists of upper case letters, and some punctuation symbols, although whether they will actually function as punctuation i'm not sure; they seem to be just breaking the cipher into chunks of the alphabetic characters, and not in any uniform manner (eg every 12 characters). I did think maybe they'll be where spaces will need to go but that would be a little obvious, and some 'chunks' are too large for that to even make sense (over 50 characters). Maybe they're just a kind of wildcard to make it more complicated to analyse.
    As i understand it i need to use frequency tables_. I want to deduce the letters for those that have a unique frequency (to be sure i've not substituted with the wrong letter if/when there is a few to choose from at the frequency). I think i know how to do this;
    use 2d arrays-
    -- one for the frequency table i'll compare the cipher text against
    -- i have a few examples of these from the internet that i'll base it on,
    since i don't have a piece of the original plaintext to analyse.
    -- is there a better way to get the frequency for comparison? There is some variation in the tables i've managed to find so.
    -- another table for storing the analysis of the cipher text
    The dimensions will be the frequency, and the character.
    For the character, do I need to use ASCII representation? or would it be ok just using characters. Just figured i need to convert the ASCII back into characters to an output file is all. Is there an implemented way to do this conversion in Java easily? I've not had to work with it before so.
    Once i've done that part, I understand I need to use a wordlist_ to try and find words in what i've decrypted so far, and try to further the decryption with this also; ie if i find a word which adds new characters, add those new characters to the whole cipher. When finding words would i need to represent the cipher i'm working on with just the characters i have deduced, and say '_' as a character to represent one we don't yet have? eg if we had substituted B and T in, and the word being represented was 'better' would i need to hunt for words with a representation like this-> BETTE_ for example.
    Hope that bit made sense!!! lol.
    Also, i need to insert spaces where relevant (after a discovered word i suppose).
    This is the part that is most troubling me, any ideas of where to start?
    Firstly, i've not been able to find any wordlist's on the internet, know any sources? Is there a way i could use a dictionary stored on my computer elsewhere? say the dictionary from openOffice? I haven't worked with dictionaries or wordlists before so, any help with this part will greatly improve my understanding/progress.
    Is there an implemented way to do this any of this in Java easily? I'm using the Eclipse IDE just so you know.
    That's my thoughts and questions for the moment, might have more after i hear advice (sorry if it's rather long, just want to be clear).
    Hope you can help,
    Thanks in advance!
    ps. what is the text called you have when you have decrypted it? simply the decryption text? or just plaintext again? is there a term for when it's part way decrypted? like it's not the plaintext yet?

    H84ll1 wrote:
    anybody else out there had much experience with doing this kind of decrytion? I'm quite stuck on the worlist part, where can i get a good one!!? lol.lol. did you really try googling? this search
    http://www.google.com/search?q=wordlist&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
    produces this result:
    http://wordlist.sourceforge.net/
    Does anyone know if it's possible to use something already on the computer for the worlist/dictionary part?it looks like the link above will give you better lists
    >
    I really need help on this,
    anyone..?google

  • FTP to mail scenario with DES decryption

    Hi All,
    I have a existing process where FTP data files are scheduled to be available at 1:00pm each day on the FTP server.  Earlier to support this, a Windows-based FTP client script has been developed by us  which automatically retrieves the files via the Internet and does a number of other tasks which are detailed below.  This script runs at 1:10pm each day, including weekends and holidays.  The script retrieves 3 files, which are saved locally, and then decrypted, archived, and finally transferred via mail and also FTP to specific Unix directories for import into various SAP systems
    I have a scenario where SAP PI needs to do the same stuff above that is pick a file from the ftp location and send it to a mail address. The file will be in encrypted format and SAP PI needs to decrypt the file and the decrypted file needs to be send through.
    The files at the FTP side are encrypted using DES Encryption so ideally SAP PI needs to decrypt it using DES decryption.
    I know I can keep the DES software on the UNIX server at XI side and call it in sender file adapter at OS level calls but as far as I know it will be difficult for maintenance as the logs won't be available for proper monitoring.
    What is the best way to achieve this  ?
    Thanks in advance.
    Ravijeet
    Edited by: RAVIJEET.SAP.PI on Dec 2, 2010 4:00 PM
    Edited by: RAVIJEET.SAP.PI on Dec 2, 2010 8:18 PM

    Any suggestions

  • Problem with DES Decryption of String - Need Urgent Help

    Hi,
    I created this program to encrypt and decrypt a string using DES algorithm but somehow I keep getting an exception. The code is given below.
    /* ASCryptography.java*/
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import java.io.*;
    import sun.misc.BASE64Decoder;
    import sun.misc.BASE64Encoder;
    public class ASCryptography
         public static String[] encryptPassword(String password)
              String returnvalue[] = new String[2];
              try
                   KeyGenerator keygen = KeyGenerator.getInstance("DES");
                   SecretKey skey = keygen.generateKey();
                   byte[] bytekey = skey.getEncoded();
                   returnvalue[0] = new BASE64Encoder().encode(bytekey);
                   Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
                   cipher.init(Cipher.ENCRYPT_MODE, skey);
                   byte[] bytepassword = password.getBytes();
                   byte[] byteencryptedpassword = cipher.doFinal(bytepassword);
                   returnvalue[1] = new BASE64Encoder().encode(byteencryptedpassword);
              catch(Exception err)
              return (returnvalue);
         public static String decryptPassword(String key, String encryptedpassword)
              String password = null;
              try
                   Cipher decipher = Cipher.getInstance("DES/CBC/PKCS5Padding");               
                   byte[] bytekey = new BASE64Decoder().decodeBuffer(key);
                   SecretKey skey = new SecretKeySpec(bytekey, "DES");
                   decipher.init(Cipher.DECRYPT_MODE, skey, decipher.getParameters());   /* Netbeans detected the error to be in this part*/
                   byte[] byteencryptedpassword = new BASE64Decoder().decodeBuffer(encryptedpassword);
                   byte[] bytedecryptedpassword = decipher.doFinal(byteencryptedpassword);
                   password = new String(bytedecryptedpassword);
              catch(Exception err)
                   System.out.println(err);
              return password;
    }The methods of this class are used by another class given below.
    /*Crypt.java*/
    public class Crypt
         public static void main(String[] args)
              String password = "pic01234";
              String value[] = new String[2];
              value = ASCryptography.encryptPassword(password);
              System.out.println(value[0]);
              System.out.println(value[1]);
              String returnedvalue = ASCryptography.decryptPassword(value[0], value[1]);
              System.out.println(returnedvalue); //the returned value remains null
              System.out.println(returnedvalue.length()); // This generates a null pointer exception coz of above.
    }Now whenever I run the Crypt.java program the Netbeans IDE gives the following as output
    jL+Fg2EBp9Y=
    LOhqKHoJRkKWc76IkU4q/A==
    java.security.InvalidAlgorithmParameterException: Parameters missing
    null
    Exception in thread "main" java.lang.NullPointerException
    I used the Step in tool of Netbeans and came out with the following conclusion
    1. The first 2 strings are the encrypted key and the password string so encryption is working fine.
    2. All is fine till the decipher.init(Cipher.DECRYPT_MODE, skey, decipher.getParameters()); part is encountered at this point the java.security.InvalidAlgorithmParameterException: Parameters missing is thrown.
    3.The NullPointerException is caused due to the null value stored in returnedvalue
    Can anyone help me out with this one I have been trying to solve for the past 6 hours.
    Thanks!

    Also -
    1) Using an array to return a compound result is at best poor. You should really define a class as a container for your encryption result.
    2) Since you generate and return a new key for each password, where are you going to store the key. If you store it in the same place (database ?) as the encrypted password then this is just the same as not encrypting the password because anyone with with access to the encrypted password will also have access to the key!

  • Help with DES key

    In my Java application, I use a DES key to encrypt files. Im not much of a security guy, so was wondering what a DES key looks like. Is it a string of characters? Is it a number?.
    The reason Im asking is that my application requires the user to note down the key and remember it (perhaps by jotting it down on a piece of paper). The key value has to hence be displayed to the user. How can I display the key value in Java in a human readable form so that next time he types it into my application, the application gets the same key it printed out earlier?
    Many thanks

    Seems a silly approach asking the user to remember the key but you will need to encode the key from binary into human readable form. You could try Base64 or Hex encoding.
    P.S. A PBE approach to the whole thing would probably be better.

  • InternalError: DES Decryption error

    **PLEASE HELP** I recenty did an extension update from MCE 1.2.1 to 1.2.2 for both the 1.2.2 framework and provider. It resolved my previous ExceptionInInitializerError of 'Cannot set up certs for trusted CAs.' I'm now getting an InternalError or "DES Decryption error
    at com.marconi.soc.util.Des3.decrypt (Des3.java:114)
    at com.marconi.soc.util.Crypt3.decrypt (Crypt3:java:51)
    and so on.
    This occurs after starting Openview's NNM which is integrated with Marconi's NMS app, ServiceOn Data (ver2.2).
    I'm not a software or java person so I desperately need some expert help from this forum.
    I believe we're using jre 1.2 thru 1.4 ( each NMS app uses a different jre version, I think). It all worked fine before the JCE expired.

    Hi,
    MDN (Message Disposition Notifications) is nothing but an Exchange Level acknowledgement. MDN ensures the sender of the document that the recipient has successfully received the document. The sender specifies how the MDN is to be sent back (either synchronously or asynchronously, and signed or unsigned). MDN provides the "Non-repudiation" element of AS2
    In case, recipient is able to read the received message successfully a success MDN is sent back otherwise a failed MDN is sent back. Not getting any MDN back also indicates a failure.
    Ask your tp to check the information he/she received in MDN.
    Regards,
    Anuj

  • DES decryption

    Hi,
    If I have a file that is DES encrypted and I know the String key value e.g. "8AE.B(,5". How can I decript the file?
    Thanks in advance.
    PS I also need to GUNZIP this afterwards...
    String x = "8AE.B(,51";               
    byte[] keyBytes  = x.getBytes();
    SecretKey key = new SecretKeySpec(keyBytes, "DES");Is this the correct way to use the String key??

    Will this type of code help?
    e465. Converting a 56-bit Value to a DES Key
    The DES encrypter/decrypter requires a 64-bit key where only 56-bit are significant. The other 8-bit are parity bits used to ensure that the key has not been corrupted. To make the 64-bit key, the 56-bit value is broken up into 7-bit chunks. Each 7-bit chunk is moved into an 8-bit slot taking up the most significant bit positions. The least significant bit (the parity bit) is set to either 1 or 0 in order to make the quantity of 1 bits in the byte an odd number.
    This example implements a method to convert a 56-bit value into a valid DES key. Such a method could be used to convert a 7-character string password to a valid DES key.
    See also e462 Encrypting a String with DES.
        // Takes a 7-byte quantity and returns a valid 8-byte DES key.
        // The input and output bytes are big-endian, where the most significant
        // byte is in element 0.
        public static byte[] addParity(byte[] in) {
            byte[] result = new byte[8];
            // Keeps track of the bit position in the result
            int resultIx = 1;
            // Used to keep track of the number of 1 bits in each 7-bit chunk
            int bitCount = 0;
            // Process each of the 56 bits
            for (int i=0; i<56; i++) {
                // Get the bit at bit position i
                boolean bit = (in[6-i/8]&(1<<(i%8))) > 0;
                // If set, set the corresponding bit in the result
                if (bit) {
                    result[7-resultIx/8] |= (1<<(resultIx%8))&0xFF;
                    bitCount++;
                // Set the parity bit after every 7 bits
                if ((i+1) % 7 == 0) {
                    if (bitCount % 2 == 0) {
                        // Set low-order bit (parity bit) if bit count is even
                        result[7-resultIx/8] |= 1;
                    resultIx++;
                    bitCount = 0;
                resultIx++;
            return result;
        // Get the 56-bit value
        byte[] raw = new byte[]{0x01, 0x72, 0x43, 0x3E, 0x1C, 0x7A, 0x55};
        byte[] keyBytes = addParity(raw);
        // You can check that the parity has been set properly
        try {
            boolean b = DESKeySpec.isParityAdjusted(keyBytes, 0);
        } catch (java.security.InvalidKeyException e) {
            // The DES is invalid
        // Convert the bytes into a SecretKey suitable for use by Cipher
        SecretKey key = new SecretKeySpec(keyBytes, "DES");

  • Problems with Des/CBC/PKCS5Padding

    Hello, I'm working on a project for the university. It's about a Client FTP that sends crypted file content, with the server that has to do the decryption phase.
    The function of decrpytion reads the content from a file, decrypt it and sends it to the server, that has the function of decrypting and storing what it receives.
    I have to problems:
    1) For the encryption with DES, shall I read 8-byte a time from the file? In this case I have to use update() method for encryption, until I don't have the last block that is to encrypt with doFinal(). Then for the decryption shall I do the same things for the block, right?
    2) Do I have a good encrpytion if a load all the content of the file (that could be not 8-byte-multiple) into an array and then apply the doFinal()?

    Hi. I posted a message previously about DES ands it
    output but the response didn't help my situation. I
    want to be able to input 8bytes into the DES and get 8
    bytes out. I found another post about inputting 8bytes
    into the DES and getting 8bytes out, but when I did
    implement it, it still didn't work.
    // Encode bytes to base64 to get a string
    return new sun.misc.BASE64Encoder().encode(enc);Base64 encoding expands the original by 4/3rds - it's the way Base64 works. So, DES is taking in eight bytes and producing eight bytes, which is expanding to 12 bytes as a result of Base64.
    There is no "fix" available - it's the way the algorithms work.
    Grant

  • Can't get it to work!!! Please help with IllegalBlockSizeException

    I have tried several things, I have searched the forume many times ever
    since yesterday, but I just can't figure this out. Here is my method to encrypt:
    private void encryptPassword(String p)
    try{
    //generate key using DES algorithm
    byte key[] = "ababcabc".getBytes();
    SecretKeySpec secretKey = new SecretKeySpec(key,"DES");
    //get cipher for DES algorithm
    Cipher cipher = Cipher.getInstance ("DES");
    cipher.init(Cipher.ENCRYPT_MODE,secretKey);
    //encrypt password
    //byte[] tmp = Base64.encode(p.getBytes());
    byte[] encryptedPswd = cipher.doFinal(p.getBytes("UTF-8"));
    //byte[] encryptedPswd = cipher.doFinal(tmp);
    password = new String(encryptedPswd, "UTF-8");
    catch(Exception e){
    logger.error("ERROR: Unable to encrypt password "
                                       + "due to Exception: " + e);
    And here is my method to decrypt:
    private String decryptPassword()
    try
    {   //generate key using DES algorithm
    byte key[] = "ababcabc".getBytes();
    SecretKeySpec secretKey = new SecretKeySpec(key,"DES");
    //get cipher for DES algorithm
    Cipher cipher = Cipher.getInstance ("DES");
    cipher.init(Cipher.DECRYPT_MODE,secretKey);
    //byte[] cipherCode = Base64.decode(password.getBytes());
    //byte[] decryptedPswd = cipher.doFinal(cipherCode);
    byte[] decryptedPswd = cipher.doFinal(password.getBytes("UTF-8"));
    return new String(decryptedPswd, "UTF-8");
    catch(Exception e){
    logger.error("ERROR: Unable to decrypt password "
                                       + "due to Exception: " + e);
    return "";
    As you can see, I have tried to use Base64 encoder, but that didn't work either. I got ArrayIndexOutOfBounds exception with that. I followed this thread to try that: http://forum.java.sun.com/thread.jsp?forum=9&thread=302490. I used to get BadPaddingException when I didn't use "UTF-8" encoding. But now I get IllegalBlockSizeException. Please let me know what I am doing wrong.
    Thank you so much!
    Malia

    I found the answer to my question at this site: http://javaalmanac.com/egs/javax.crypto/DesString.html
    The key is to use base64 encoding, but I didn't know that the class sun.misc.BASE64Encoder and sun.misc.BASE64Decoder comes with regular JDK. I searched for base64 encoders, but the implementation from Ostermiller didn't work for me. So, for those having the same problem, go to that site. Here is the snapshot:
    public class DesEncrypter {
    Cipher ecipher;
    Cipher dcipher;
    DesEncrypter(SecretKey key) {
    try {
    ecipher = Cipher.getInstance("DES");
    dcipher = Cipher.getInstance("DES");
    ecipher.init(Cipher.ENCRYPT_MODE, key);
    dcipher.init(Cipher.DECRYPT_MODE, key);
    } catch (javax.crypto.NoSuchPaddingException e) {
    } catch (java.security.NoSuchAlgorithmException e) {
    } catch (java.security.InvalidKeyException e) {
    public String encrypt(String str) {
    try {
    // Encode the string into bytes using utf-8
    byte[] utf8 = str.getBytes("UTF8");
    // Encrypt
    byte[] enc = ecipher.doFinal(utf8);
    // Encode bytes to base64 to get a string
    return new sun.misc.BASE64Encoder().encode(enc);
    } catch (javax.crypto.BadPaddingException e) {
    } catch (IllegalBlockSizeException e) {
    } catch (UnsupportedEncodingException e) {
    } catch (java.io.IOException e) {
    return null;
    public String decrypt(String str) {
    try {
    // Decode base64 to get bytes
    byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
    // Decrypt
    byte[] utf8 = dcipher.doFinal(dec);
    // Decode using utf-8
    return new String(utf8, "UTF8");
    } catch (javax.crypto.BadPaddingException e) {
    } catch (IllegalBlockSizeException e) {
    } catch (UnsupportedEncodingException e) {
    } catch (java.io.IOException e) {
    return null;
    Here's an example that uses the class:
    try {
    // Generate a temporary key. In practice, you would save this key.
    // See also e464 Encrypting with DES Using a Pass Phrase.
    SecretKey key = KeyGenerator.getInstance("DES").generateKey();
    // Create encrypter/decrypter class
    DesEncrypter encrypter = new DesEncrypter(key);
    // Encrypt
    String encrypted = encrypter.encrypt("Don't tell anybody!");
    // Decrypt
    String decrypted = encrypter.decrypt(encrypted);
    } catch (Exception e) {

  • Help with GSSAPI Kerberos in tomcat JNDIRealm

    Greetings,
    I could use some help with getting tomcat 5.5.12 to use Kerberos against Microsoft Active Directory.
    I have been using Ethereal to sniff the packets going back and forth from tomcat and I verified that with a normal server.xml entry (remove the authentication attribute keyword below), it uses 'simple'
    authentication (clear text passwords).
    My original server.xml works just fine but now I'm trying to take it to next level and I found documentation (jdk-1_5_0-doc.zip\docs\guide\jndi\jndi-ldap.html)
    specifies that there are the following values:
    - EXTERNAL (RFC 2222). This mechanism obtains authentication information from an external source (such as SSL/TLS or IPsec).
    - DIGEST-MD5 (RFC 2831) is for Digest Authentication.
    - GSSAPI (RFC 2222) is for Kerberos V5 authentication.
    I wish to use GSSAPI to talk with Active Directory so I setup my server.xml with the following :
    <Realm className="org.apache.catalina.realm.JNDIRealm"
         debug="4"
         authentication="GSSAPI"
         connectionName="CN=Klotz\, Dennis,OU=myou,DC=company,DC=com"
         connectionPassword="myPassword"
         connectionURL="ldap://10.16.0.xx:389"
         alternateURL="ldap://10.16.0.xx:389"
         userBase="OU= myou,DC=company,DC=com"
         userSearch="(sAMAccountName={0})"
         userSubtree="true"
         userRoleName="memberOf"
    />And now I get a different type of error from Catalina.out:
    Oct 28, 2005 2:28:47 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos Ticket)
            at
    sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential
    .java:133)
    .....At least the GSSAPI is being recognized! My next step was talking with IT; they suggested a c:\winnt\krb5.ini with the following contents:
    [libdefaults]
    default_realm = COMPANY.COM
    default_tgs_enctypes = des-cbc-crc
    default_tkt_enctypes = des-cbc-crc
    [realms]
    COMPANY.COM = {
    kdc = addy.mycompany.com:88
    admin_server = addy. mycompany.com:88
    kpasswd_server = addy. mycompany.com:464 default_domain = COMPANY.COM }And that I then execute:
    $ kinit DKlotz
    Password for [email protected]:mypassword New ticket is stored in cache file C:\Documents and Settings\DKlotz\krb5cc_dklotzBut as you can see from the previous tomcat error log that something is still missing. Do I need to move the cache file or do other commands so that the code within ldap.jar can use it?
    At this time tomcat never tries connecting to the LDAP server as it can't get out of the starting gate. I've got something wrong / missing from the Kerberos setup.
    Any help is greatly appreciated!!
    -Dennis Klotz

    Ok I've made progress, whether it is backwards or not, I don't know yet.
    I've added :
    -Djavax.security.auth.useSubjectCredsOnly=false
    To my Catalina options environment variable in Catalina.bat.
    Now I get the error:
    WARNING: Exception performing authentication
    java.lang.SecurityException: Unable to locate a login configuration
         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at javax.security.auth.login.Configuration$3.run(Configuration.java:216)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:210)
         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
         at sun.security.jgss.LoginUtility.login(LoginUtility.java:72)
         at sun.security.jgss.krb5.Krb5Util.getTicketFromSubject(Krb5Util.java:137)
         at sun.security.jgss.krb5.Krb5InitCredential$1.run(Krb5InitCredential.java:331)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.security.jgss.krb5.Krb5InitCredential.getTgtFromSubject(Krb5InitCredential.java:328)
         at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:131)
         at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:72)
         at sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:149)
         at sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:389)
         at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:60)
         at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:37)
         at sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:96)
         at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:178)
         at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
         at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:155)
         at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:105)
         at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)
         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2637)
         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
         at org.apache.catalina.realm.JNDIRealm.open(JNDIRealm.java:1515)
         at org.apache.catalina.realm.JNDIRealm.start(JNDIRealm.java:1601)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Caused by: java.io.IOException: Unable to locate a login configuration
         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
         ... 56 moreAm I moving in the right direction?
    -Dennis

  • Hi Guru Search Help with Restriction

    Hi guru,
    What is my requirment . I created elementry  search in se11 and i used this search in dialog program. Its shows all company code and commidity code.
    But boss I want restrict this search help only for one Company Code (GB).It should show company code and commidity code only GB comapny Code.
    Where I can restrict this search help.
    Please give me possible help.
    Point will rewards.
    Thanks&Regards
    Ramana

    Hi Mr. Kumar,
                    I'll give one examle for which I had done the same scenerio for PP module for version selection...Please find the eg. code. In this scenerio I had restricted only 4 versions....
    I'll give you code from select option till at selection-screen on value request...
    In this I have also done the validation part...
    First create a elementary search help with required fields... As per my scenario I had created two fields VERSB & VBTXT. In my scenario I have given restriction on VERSB....
    then the same search help you have to use in the program to pass to the parameters..
    ****Select Options....
    SELECT-OPTIONS: S_VERNUM FOR T459V-VERSB OBLIGATORY NO-EXTENSION NO INTERVALS.
    *****At Selection-Screen on value request....
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_VERNUM-LOW.
      PERFORM F4HELP.
    ******Form F4HELP....
    FORM F4HELP .
      REFRESH IT_DDSHSELOPS.
      CLEAR   WA_DDSHSELOPT.
      WA_DDSHSELOPT-SHLPNAME = 'ZVERSB'.
      WA_DDSHSELOPT-SHLPFIELD = 'VERSB'.
      WA_DDSHSELOPT-SIGN = 'I'.
      WA_DDSHSELOPT-OPTION = 'EQ'.
      WA_DDSHSELOPT-LOW = '04'.
      APPEND WA_DDSHSELOPT TO IT_DDSHSELOPS.
      WA_DDSHSELOPT-LOW = 'TC'.
      APPEND  WA_DDSHSELOPT TO IT_DDSHSELOPS.
      WA_DDSHSELOPT-LOW = 'TE'.
      APPEND  WA_DDSHSELOPT TO IT_DDSHSELOPS.
      WA_DDSHSELOPT-LOW = 'TL'.
      APPEND  WA_DDSHSELOPT TO IT_DDSHSELOPS.
      CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
        EXPORTING
          TABNAME          = 'T459V'
          FIELDNAME        = 'VERSB'
          SEARCHHELP       = 'ZVERSB'
          DYNPPROG         = SY-REPID
          DYNPNR           = SY-DYNNR
          DYNPROFIELD      = 'VERSB'
          SELECTION_SCREEN = 'X'
          CALLBACK_SELOPT  = IT_DDSHSELOPS.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    *******At selection Screen on above select option field...for validation
    AT SELECTION-SCREEN ON S_VERNUM.
      PERFORM VALIDATEVERSIONS.
    *******Form VALIDATEVERSIONS
    FORM VALIDATEVERSIONS .
      REFRESH R_VERNUM.
      CLEAR R_VERNUM.
      R_VERNUM-SIGN = 'I'.
      R_VERNUM-OPTION = 'EQ'.
      R_VERNUM-LOW = '04'.
      APPEND R_VERNUM.
      R_VERNUM-LOW = 'TC'.
      APPEND R_VERNUM.
      R_VERNUM-LOW = 'TE'.
      APPEND R_VERNUM.
      R_VERNUM-LOW = 'TL'.
      APPEND R_VERNUM.
      IF NOT S_VERNUM-LOW IN R_VERNUM.
        CALL FUNCTION 'C14Z_MESSAGES_SHOW_AS_POPUP'
          EXPORTING
            I_MSGID = 'ZPP'
            I_MSGTY = 'E'
            I_MSGNO = '015'
            I_MSGV1 = 'Please Select'
            I_MSGV2 = 'One of these'
            I_MSGV3 = 'Versions'
            I_MSGV4 = ': 04, TC, TE, TL.'.
        CALL SCREEN 1000.
      ENDIF.
    ENDFORM.                    " VALIDATEVERSIONS
    This code will help you to work on your query...
    Please reward a point . I am sure this will help you....
    Cheers.....
    Sagun Desai....

  • Beginner in java and need your help about DES

    hello,
    I m a new guy in java programming and learn from many books.I m making a website and portal right now and dying need your help about DES.my portal (using java) requires somebody to make a login name and a password.I m done with the server and client things and rite now stuck with this "DES" stuff.
    so I make some conditions and algorithm below..
    1. when a user login,the password is encrypted.at this point,cleartext(id) and encryption (M,N) are involve.
    2. then the key is changed based on algorithm.
    3.the key changed by key(id) is received and the original text should be encrypted.
    the algorithm
    1. the original text x1.x2.x3.x4.x5.x6.x7.x8 (64 bits)
    2. encypt the password
    a. Each character is changed into an int type by the ASCII code, and let the 1st bit be an odd number parity bit.
    b.The 1st bit of the 1st character in (IP) is set to '1', and the 8th bit of the 8th character as '64'.
    c.the rest (IP) is like this
    1 2 3 4 5 6 7 8
    0 # 58 50 42 34 26 18 10 2
    8 # 60 52 44 36 28 20 12 4
    16 # 62 54 46 38 30 22 14 6
    24 # 64 46 48 40 32 24 16 8
    32 # 57 49 41 33 25 17 9 1
    40 # 59 51 43 35 27 19 11 3
    48 # 61 53 45 37 29 21 13 5
    56 # 63 55 47 39 31 23 15 7
    d. and lastly,from above,,it should be done like this
    1 2 3 4 5 6 7
    0 # 40 8 48 16 56 24 64 32
    8 # 39 7 27 15 55 23 53 31
    16 # 38 6 26 14 54 22 52 30
    24 # 37 5 25 13 53 21 51 29
    32 # 36 4 24 12 52 20 50 28
    40 # 35 3 23 11 51 19 49 27
    48 # 34 2 21 10 50 18 48 26
    56 # 33 1 20 9 49 17 47 25
    e. key y1,y2,y3,y4,y5,y6,y7,y8 (64bit)
    f. generate the key based on ID
    a. Each character is changed into an int type by the ASCII code, and let the 1st bit be an even number parity bit.
    b.the process is repeat again.
    anybody has an idea to help me with the sample program?
    thanks in advance...

    just ask about a simple program how to receive a
    password from somebody and change it to a key..and
    then confirm it with DES.Once again I have a problem understanding what you are asking.
    Are you trying to use the password as a key to encrypt some 'standard thing' and place this encrypted value in a database? If so then look in the JCE for 'password based encryption' such as PBEWithMD5AndDes. This seems back to front to me but I can see nothing wrong with the approach since the 'standard thing' you would encrypt is in effect a key. If this is for a commercial application then I would find a security expert to evaluate your proposal!
    In my experience it is more normal to encrypt the user's password with DES and store the result in the database. To do this just look in the JCE for DES encryption and consider using DES with CBC and PKCS5 padding. Also, consider encrypting the concatenation of the user's 'user name' with the password as this will (almost certainly) avoid having two encrypted values in the database that are the same even if two users have the same password.
    For both of these you might consider using Base64 or Hex to turn you encrpted bytes into ASCII characters before trying to store them in your DB.

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • I need help with Sunbird Calendar, how can I transfer it from one computer to the other and to my iphone?

    I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone?
    Thank you in advance,

    Try the forum here - http://forums.mozillazine.org/viewforum.php?f=46 - for help with Sunbird, this forum is for Firefox support.

  • Hoping for some help with a very frustrating issue!   I have been syncing my iPhone 5s and Outlook 2007 calendar and contacts with iCloud on my PC running Vista. All was well until the events I entered on the phone were showing up in Outlook, but not

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

Maybe you are looking for

  • Windows XP mode/ Windows virtual PC

    I have to support some LV7.1 programs (along with newer versions).  I just bought a new laptop with Windows 7 Home 64-bit.  LV7.1 loads and runs, but the drivers disk pukes on the 64-bit OS.  (This was not unexpected...) The new PC does have an Intel

  • Safari causing Mac OS 10.8.3 crashes

    Only happens on some websites.  Here's the error log. Interval Since Last Panic Report:  40077 sec Panics Since Last Report:          2 Anonymous UUID:                    2123BB42-6002-9750-62C2-F3C0C9071A8B Tue Apr 30 16:59:13 2013 panic(cpu 0 calle

  • My laptop quit so how do I connect my ipad and iPhone to the new one and make it work?

    My laptop quit so how do I connect my ipad and iPhone to the new one and make it work?

  • Macbook Pro- time and date changes to random?

    My 2011 Macbook Pro's battery died. I plugged it in, and it turned back on. After starting up, I got a message saying: Your computer's clock is set to a date before January 1, 2008. This may cause some applications to behave erratically. And my clock

  • DESCRIBE whole oracle 9i

    Hallo, How many in-built functions and Packages are in Oracle 9i? Exact number and their respective syntax.. How many standard keywords or commands, facilities [like SELECT, INSERT, SET HEADINGS ON/OFF] in Oracle9i? Where can i get this information o