Generate key for DES

Hi,
I'm tring to use the Cipher.init(...) method, but I have to introduce the DES secret key first. I am confused about the concepts of generating a key and providing one in the correct format. In my situation, I want to provide the secret key and then init the cipher object with it... My key is an 8-byte array.. But the cipher method expects an object of type 'Key', which i don't know how to manipulate..
thanks in advance,
fbm

Given the key bytes then
        byte[] keyBytes = the 8 bytes of your key
        SecretKey key = new SecretKeySpec(keyBytes, "DES");P.S In case you are wondering, SecretKeySpec implements the SecretKey interface.

Similar Messages

  • Keychain not generating keys for email certificates

    In trying to set up email signing for two different machines I ran into a problem when adding email authentication certificates from Comodo.  After downloading the .p7s files each of the users double clicked the files, adding them to their key chains.  However, when they opened Mail there were no options for adding the lock(encrypt) and star(digitally sign) icons to their 'compose new message' windows.
    After a lot of screwing around, I discovered that the new certificates had been added, but just as regular certificates and never made it to the 'My certificates' section.  After some more comparisons I discovered that the private keys had not been generated automatically when the keys were added.  The solution was to send the origional files to a machine that was generating keys, add them to that machine's keychain and then export the certificates (this time with a .p12 extention) and re-import the keys back to the owners machines.
    That's a pain.  Anyone seen this before?  Have a better fix?
    Configs as follows
    Working configuration (generates keys)
    iMac 27" 3.4ghz Intel core i7
    Mac os 10.7.2
    keychain 5.0
    Broken configurations (not generating keys)
    Mac Mini 2.66 intell core duo
    Mac os 10.7.2
    keychain 5.0

    Hi Jack,
    Open Keychain Access in Utilities, use Keychain First Aid under the Keychain Menu item, then either check the Password under that item, change it, or delete it and start over.
    Resetting your keychain in Mac OS X...
    If Keychain First Aid finds an issue that it cannot repair, or if you do not know your keychain password, you may need to reset your keychain.
    http://support.apple.com/kb/TS1544

  • How to generate keys for the records

    Hi Gurus,
          can anybody explain me how to create keys for the recors while working with keymapping.
    Regards
    Ravikumar

    Hi Yugandher,
    Is your Question pertaining to Key generation in MDM or using the Remote key for importing and syndication in MDM?
    Remote Keys are system specific uniques maintained in MDM while importing source records from different source system.You need to Enable key mapping in Console and then map the <Remote key> field to the unique key in Import manager and do similar mapping in syndicator as well.
    You can view the key mapping for differnt records under the Edit key mapping (context menu) right clicking on any record.
    To know more on this refer the below link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7051c376-f939-2b10-7da1-c4f8f9eecc8c  (Key mapping) 
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30843106-5539-2b10-75a9-da483911b0d9  (Key mapping)
    For Key generation in MDM you can use the Qualified range property of Remote system in Console for Key genearation.However these keys will be genearted only after syndication and are created and assigned within MDM and not maintained from any source remote system.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Generating Key for new installation

    Hi,
    I installing IDES , I am trying to generate key. the FYI steps i have involved
    goto SMSY>select other object>generate key==yes got the key
    When i entered the generated key from solution manager
    The system does not accepts.
    The error message read as<b>"HOST directory to central instance and system ID incorrect"
    Please help tell me basic requiremnts or procedures to follow.
    REGARDS,
    PAUL

    Hello Paul,
    Kindly follow the steps mentioned in the below link to generate the key...
    http://help.sap.com/saphelp_sm40/helpdata/en/45/51fbdbd4941803e10000000a1553f7/frameset.htm
    regards,
    Anand

  • How to generate all possible keys for DES algorithm

    Hello every one,
    I want to generate all the possible key combinations for the DES algorithm 56-bit "actuallly 64 but the last 8 bits are just padding", so can anyone plz help how can i do that? or give me article or something that might help me?
    Thanks in advance,
    Amr M. Kamel.

    I know that but who said that it will be one
    processor it will be on distributed and clustered
    environment :). I just want to know how to generate
    the keys "or write binary".
    Thans again for your helpA cluster of 2285 machines will still take a year! The simplest algorithm is to just count from 0 to 2^56 .
    If you are thinking of cracking DES then there is a Book I have on my shelf 'Cracking DES' published by the 'Electronic Frontier Foundation' ISBN 1-56592-520-3 . It contains the C code and describes the hardware used. The hardware cost was about $100,000 and it cracks DES in about 3.5 days.
    Assuming Moore's law ( http://en.wikipedia.org/wiki/Moore's_law ) applies then it should now take about much less than a day and cost much less than $100,000. BUT - it will take a long time using basic computers.

  • 1809: An error has occured while generating a seccion key for encryption

    Hi
    I am trying to perform a remote control operation using Console One
    1.3.6c, but evry thime getting the following error message
    "1809: An error has occured while generating a seccion key for
    encryption." I had looked for it in Novell site & found that the fix is
    to upgrade to ZDF 6.5 SP1, but I am looking for a diffrent work around
    for it. Please let me know is there any work around for this problem.
    Regard
    Kallol
    kallol

    kallol,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Exact Steps to Generate Installation keys for other systems In SolMgr4.0

    Hi friends,
    Please provide me exact Steps to Generate Installation keys for other systems In SolMgr 4.0 SR1.
    I have steps to make this thing in solmgr 3.2 as please change as it in solmgr4.0 sr1
    txn SMSY
    Expand Landscape components -> Systems
    Right click on Systems  ->New System
    Type SAPID, & Installation No. (S44 , 0040099252) & sAVE
    Expand Newly Added system
    Right Click & Create
    Now we can use the key provided by the system.
    Please make required changes as applicable in solmgr4.0 So that I can proceed.
    Also clear vat is the difference between ECC & ERP as solmgr4.0 mention both as two systems.
    Thanks & regards
    Jaswant
    +91 9949676055
    Cheers 'N' Joyce

    Hi Jaswant,
    to generate a Solution Manager Key you can process a little bit easier.
    Call transaction SMSY, press shift+F5 (you get the "other objects" popup).
    As System enter the SID of your Solution Manager.
    ->select gen.Installation/Upgrade Key (shiftctrlF10))
    then you get a new popup. In this popup you DELETE all values, enter SID of the new system, the message server of the new system and the system number of the new system. Then press generate key.
    With this procedure you do not have to add the system to SMSY to generate the key.
    Later you should add it to SMSY, maybe you have added an SLD to SMSY then the system will be added automatically. If not you have to add it manually.
    Second question ERP <> ECC
    Good question, ECC is part (a main instance) of ERP, so it is up to you if you classify your system as an ERP or ECC.
    Regards,
    Udo Lang

  • Solution Manager can't generate  installation key  for Netweaver 2004s

    I am trying to generate installation key for a new installation of
    Netweaver 2004s or 7.0 and the Solution Manager only display SAP ECC
    5.0 or 6.0 in the field production version, when i am trying do create
    a new system landscape. My Solution Manager is 4.0 release and support
    package 10. The keys generated by ECC 5.0 or 6.0 doesn't work.

    That is because SAP has not released an ECC 7.0
    NW2004s is also refered to as 7.0.  It appears that you are confusing this with ECC 5.0 and ECC 6.0
    A NW2004s installation can contain an ECC5.0 or ECC 6.0, just like it can contain a CRM 5.0 or SRM, or EP, et cetera
    The generated keys probably do not work because you have wrong hostname or instance number entered.

  • Using Solution Manager 7.0 to Generate Solution Key for SAP Netweaver 7.3 ?

    Hi, SDN Gurus.
    We are running Solution Manager 7.0.
    I am trying to generate solution key for SAP Netweaver 7.3 system. When I was creating a new system (in TCode SMSY);  I only see Newtweaver 7.1 is the latest version available in the SAP Netweaver  product version drop down list.
    Is that true that I always need to upgrade the latest/compatible version (SP & patches) of SAP Solution Manager to generate solution key for the latest released of SAP products?
    If this is the case, what version of SAP Solution Manager I need to create new system and generate solution key for SAP Netweaver 7.3? 
    Thanks for advices,
    KC

    Hi,
    Please follow the note [Note 1274430 - Installation of Solution Manager 7.0 Stack 18 and higher|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1274430]
    and the discussions here [Direct Upgrade from Solution Manager SP16 to SP26|Direct Upgrade from Solution Manager SP16 to SP26]
    Thanks,
    Jansi

  • Support for Generated Keys in oracke jdbc drivers?

    Hi All,
    Anyone know when the Oracle Thin JDBC drivers are going to support generated keys?
    Regards,
    Lee

    Sure Justin,
    I should have made myself more clear. Sorry about that.
    I have a sequence for generating primary keys in a particular table, and a trigger to replace a null in my insert query with the nextval. That all works fine. I would like to use the DB-neutral means of getting a generated primary key...
    prepStmt = connection.prepareStatement(insertSQL, Statement.RETURN_GENERATED_KEYS);
    prepStmt.executeUpdate();
    ... and later ...
    ResultSet generatedKeyRS = prepStmt.getGeneratedKeys();
    ... etc.
    I am aware that I can get this information several other Oracle9i-specific ways, including using the sequence's .currval and creating a callable statement that returns the primary key column. However I would still like to use the nice, neat, vendor-neutral JDBCv3 way. Call me pedantic.
    Regards,
    Lee

  • Could anyone generate a SolMan Key for me?

    Dear All Experts,
    I have to install an ECC 6.0 IDES as soon as possible, but there is something wrong with our solman system, could anyone generate a solman key for me?
    my SID is IDS
    my host name is sap
    and my instance number is 00
    It's really urgent, thanks for your kind replies.
    Best Regards,
    Afshin

    Paul Babier wrote:
    > You may not request a license key n this fashion.
    > You can acess  service.sap.com/licensekey
    > You can call your CIC please refer to this note  560499.
    >
    > But how do you expect another custoemr to generate a license key, when I will belong to their installation?
    > This is just not an acceptable request.
    Paul, a license key is not the same as the requested SolMan Key.
    A License Key is provided by SAP (and will be installed via transaction SLICENSE in case of ABAP Web AS Systems).
    A Solution Manager Key is generated through SAP Solution Manager, transaction SMSY. (SAP Note 811923 -  Generating the SAP Solution Manager key)
    Anyhow, requesting a Solution Manager Key is not appreciated in this forum.
    Regards, Ruediger

  • Any easy way to generate unique primary key for database table?

    I'm currently playing with the J2EE reference implementation from Sun which comes with the IBM Cloudscape database. This Cloudscape database supports the use of an AutoIncrement field.
    First question: Can I use CMP and assume that the database will generate a proper key for me? Anyone tried it out successfully before?
    Also, based on what I've heard so far, it seems that generating database primary key is not really well-supported by J2EE using CMP in that a lot of J2EE developers have to resort to workarounds like using a session bean, JDBC and (1) some seed numbers for ID implanted in the database itself (as in the J2EE tutorial DukesBankApp example) or (2) using the SQL MAX aggregation command + 1. Usign seed number is contradictory to good database design and using MAX is dangerous for heavy traffic application if 2 beans try to insert themselves into the database at the same time (synchronizarion problem).
    Anyway I find it dumb that we still have to go back to JDBC and SQL which was the reason why the concept Entity Bean was introduced; to make database persistence transparent! Now it seems that J2EE makes it worse and more troublesome than before.
    Second Question: Is there any easy (hopefully transparent/automatic) way of generating primary key ID?

    if you want to rely on your container or database then go hard, will probably be faster.
    to make a cross container/db soln I used a CMP Entity bean called Sequence with one field for uid
    I use one instance and increment the field each time.
    To do the logic, I have a utils class with static method, no need for session bean overhead
    I reckon this approach is OK considering all things

  • Object key for object type WORKITEM is not generated

    Hi experts,
    I have a problem when I create a purchase requisition by workflow. This problem happens a client copy from production to quality system has been done.
    The problem is that the object key for the object type WORKITEM is not generated. I check in transaction SWEL in quality system it displays the following data:
    For the event data I have the following data:
    Event Instance ID - 1099124
    Object Type - BUS2105
    Object key - 0120001588 (purchase requisition number)
    Event - criadaoumodificada (createdorchanged)
    For the Receiver Data I have the following data:
    Receiver Type - WS99900003 
    Object Type  (is not displayed)
    Object Key   (is empty)
    Receiver FM - SWW_WI_CREATE_VIA_EVENT_IBF
    RFC Destination - WORKFLOW_LOCAL_010
    In the Receiver Data the object type is not displayed and the object key is not generated. In production system the object type is WORKITEM, and the object key is filled by a number of workitem.
    Can anyone tell me why this happens?
    Best regards,
    Leonel

    Hi Leonel,
    as far as I remember, those fields are updated once the receiver function module was successfully processed. In your case, I'd suggest, that you ...
    - Check the workflow local RFC destination (SM59, WORKFLOW_LOCAL_<client>)
    - Check the workflow-user (SU01, User-ID WF-BATCH normally),
    - Check for entries that stuck in the event processing (tRFC queue, transaction SM58).
    - To verify the complete system, execute transaction SWU3. The section under "Runtime environment" should be marked green.  (Ignore the red sign on definition environment).
    - For a more extensive workflow runtime check, use the transaction SWUD  (workflow diagnosis).
    After all that, your problem might be solved, or at least you know, what's all okay
    Best wishes,
       Florin

  • Impact of generating a new key for Secure Store Application

    I inherited my development environment from a predecessor, who did not document the secure store pass phrase anywhere. There are a couple of projects doing development on the system that cannot be impacted, but I need to get Project Server running on the
    system, and I cannot get the secure store to accept the credentials I set for the target application. I have recreated the target application several times, but nothing works.
    MossHostSsoHost.GetSecureStoreCredentials: Failed to get credentials from Secure Store. SecureStoreProvider threw a SecureStoreException. Exception: Microsoft.Office.SecureStoreService.Server.SecureStoreServiceException: Access is denied to the Secure Store
    Service.     at Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplicationProxy.Execute[T](String operationName, Boolean validateCanary, ExecuteDelegate`1 operation)     at Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplicationProxy.GetCredentials(Guid
    rawPartitionId, String applicationId)     at Microsoft.Office.SecureStoreService.Server.SecureStoreProvider.GetCredentials(String appId)     at Microsoft.Office.Excel.Server.MossHost.MossHostSsoHost.GetSecureStoreCredentials(String
    secureStoreApplicationId)
    So, I am wondering if I need to generate a new key for the secure store application, and what impact that would have on the existing target applications. Can someone please tell me if I generate a new key, will this break the existing applications? Thanks.

    Hi Susan,
    Once you decide to generate a new encryption key, you could follow the steps in Generate an encryption Key part in the link below:
    http://technet.microsoft.com/en-us/library/ee806866(v=office.15).aspx
    You should back up the database of the Secure Store Service application before generating a new key. Then refresh the encryption key to propagate the key to all the application servers in the farm.
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Private Key for RSAalgorithm

    Hello,
    I used RSA algorithm for encryption and i can send the encrypted text to the server , on the server side
    in order to decrypt the message i passed the public key, but how to generate the private key on the server side, i am a beginner in cryptography, can anybody help me , if possible give me the coding for encryption and decryption which will work on the client side for encryption and server side for decryption,i need RSA algorithm for it

    well, but i just used receivers public key to encrypt the data at the senders side, at the receivers side both secret and public key is generated, and the receivers secret key is used to decrypt. The ecrypted text can be accessed at the receivers side but it can't be decrypted, my program part is given below
    Sender's side
    // Create a new instance of Message class, to encrypt / decrypt message
    Message M = new Message();
    // Create a new instance of Keys, to generate keys
    Keys K = new Keys ();
    // Set the Plain Text message
    M.PlainText = ta.getText(); (ta is the text area i displayed the text file)
    // Display the Plain Text message
    System.out.println (" Message:" + M.PlainText);
    // Set the Number of Rounds
    M.NumRounds = 2;
    // Display the Number of Rounds
    System.out.println (" Rounds:" + M.NumRounds);
    // Create RSA Public, Secret key pairs
    K.CreateKeys();
    // Display Public Key individual number
    System.out.println ("Public Key:" + K.PublicKey);
    // Display Secret Key individual number
    System.out.println ("Secret Key:" + K.SecretKey);
    // Display n, the shared number (of Public and Secret Keys)
    System.out.println (" n:" + K.n);
    // Encrypt the Message
    M.Encrypt (publicKey, n);
    /* where publickey and n are generated at the receivers side and saved in the database, which is taken
    at the senders side to encrypt the data. */
    // Display the Encrypted Message
    System.out.println (" Encrypted Message:" + M.CipherText);
    String crp=M.CipherText.toString();
    AT the receiving side
    // Create a new instance of Message class, to encrypt / decrypt message
    Message M = new Message();
    // Create a new instance of Keys, to generate keys
    Keys K = new Keys ();
    // Set the Plain Text message
    //M.PlainText = ta.getText();
    // Display the Plain Text message
    //System.out.println (" Message:" + M.PlainText);
    // Set the Number of Rounds
    M.NumRounds = 2;
    // Display the Number of Rounds
    System.out.println (" Rounds:" + M.NumRounds);
    // Create RSA Public, Secret key pairs
    K.CreateKeys();
    // Display Public Key individual number
    System.out.println ("Public Key:" + K.PublicKey);
    pbk=K.PublicKey.toString();
    // Display Secret Key individual number
    System.out.println ("Secret Key:" + K.SecretKey);
    // Display n, the shared number (of Public and Secret Keys)
    System.out.println (" n:" + K.n);
    bi=new BigInteger (bi.toString().concat(String.valueOf(K.SecretKey)));
    bn=new BigInteger (bn.toString().concat(String.valueOf(K.n)));
    System.out.println("SECRET:"+bi);
    System.out.println("N:"+bn);
    M.Decrypt(bi,bskbi); // where bi is secret generated at the recivers side and bn is retrieved
    from the database , n = (p-1)*(q-1) where p and q are two large priome numbers */
    at the receivers side the encrypted text can be accessed , but the text can be decrypted, what is the problem here, can u help me to change the codings
    thanks in advance

Maybe you are looking for

  • How to assign a Sales Org and Product group

    all the config have been maintained (creating the hierarchies/categories, assign the set types to categories etc.) under IMG->Cross-Application Components->SAP Product. Also assigned the set type for sales data/product group for category MAT_DIEN. Bu

  • Deploying a Portlet into Weblogic

    Hi Folks, I have a basic question about deploying a portlet into weblogic. I created a simple JSF/ADF application and used the Portlet Bridge to "Portletize" it. When I run the application using JDev11 everything works fine, but If I try to deploy it

  • Adding functionality

    This is my QuoteSearch.jsp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%-- jsf:pagecode language="java" location="/JavaSource/pagecode/quotes/property/ho_webservices/jsps/QuoteSearch.java" --%><%-- /jsf:pagecode --%> <%@taglib ur

  • Overhead Actualization

    Dear Members, If the overheads are applied to an order based on the activities performed and from the overheads secondary cost elements of costing sheet, and those are later not actualized from the expense posted in FI module, will it double charge t

  • In my phone 4s near the bettery showing one lock sign with round what is this ?

    in my phone 4s near the bettery sign showing one lock sign with round what is this ?