How to  use Shared secret key(diffie hellman) for encryption n decryption

In my client server program i wanted to encrypt a random key using shared secret key for encryption and decryption with DES. but i'm unable to encrypt it as init() is not takin the shared secret key for encryption. somebody please help. my mail id - [email protected]

You need to post some code because it works for everyone else.

Similar Messages

  • SSL: how to use Multiple Private key/Certificate pair for authentication.

    Hi all,
    i am implementing SSL in java using X509 Certificate/private key combination.
    i have two set of private key/certificate pair.
    one is factory default and another is generated at run time.
    my problem is to try ssl connection with both pairs on same tcp/ip connection.
    e.g. on server side: first try ssl connection with factory default certificate, if it fails try connecting with generated certificate on same tcp/ip connection.
    on client side: if generated certificate(this certificate was generated at server side) is present first perform server authentication using this certificate otherwise authenticate server with factory default certificate.
    can someone please help and let me know how do i need to configure both ends(client and server) for achieving the same.
    Thanks In Advance
    Saurabh Ahuja

    Client code does not contain any default truststore and needs a certificate for authentication.Of course it does. OpenSSL has a way of doing that: some kind of equivalent for the truststore. None of the stuff you've posted here about generating certificates at runtime has any bearing on that problem.
    It's like this. The idea of PKI with SSL is as follows:
    - the server has a private key and a signed certificate. Preferably it's signed by a CA that the client already trusts, otherwise if it's self-signed it has to be exported from the server's keystore and imported into the truststores of all the clients.
    - the client has a truststore that trusts the server, one way or the other, see above.
    - the server's private key is private to it. Nobody else has it. Nobody else can ever get it. If it ever leaks, the server is compromised, and server authentication via that private key now means absolutely nothing. You have lost security.
    - the server sends its cert to the client along with a digital signature signed by its private key.
    - the client (a) decides whether it trusts the cert, via its truststore, and (b) verifies the digital signature, which establishes that the server owns the certificate.
    At this point the server is authenticated to the client and the SSL connection is open. It can now be used as an ordinary socket connection.
    If you want client authentication too, you need all the above in reverse as well, i.e. reading server for client and client for server throughout. Note particularly that each client must have its own private key. Otherwise the private key isn't private, so signing something with it doesn't establish ownership, so client authentication isn't valid.
    You need to understand all this stuff and relate it to the apparently broken security design of your application. Generating a private key and a certificate at runtime is complete nonsense within the context of PKI and SSL. It proves nothing, establishes nothing, authenticates nothing; it just wastes time.

  • How to use a function key on keyboard for executing a non SAP program

    Hello Gurus.
    My client want to run a non SAP program selecting the specific function key on keyboard during the entering data on SAP.
    i knew that it is possible to execute a non sap program after adding special program each by SAP program.  but, it is huge jobs.
    client wants to run a non sap program wherever he is on SAP program.  Is it possible ?

    Hi,
    1. Create a ".exe" file for the .NET application.
    2. Create a PF-STATUS and assign the Function Code for the desired Function Key in the SAP program.
    3. In the USER COMMAND code inside program, when the respective function code is triggered, write the below code with the path to the .NET exe file.
    CALL METHOD cl_gui_frontend_services=>execute
      EXPORTING
        document = '.NET exe file path'
      EXCEPTIONS
        OTHERS   = 1.

  • How to Use Home+End Key on new short usb apple keyboard on XP

    How to Use Home+End Key on new short usb apple keyboard on XP
    now i use macbook and new short apple keyboard.
    it hasn't Home and End key. i try to use Fn + -> , Fn + <-
    it cann't do that. How can i set the Fn + <- be Home key
    and Fn + -> be End key like on my macbook keyboard
    thank you for answer

    Easy, no need to be harsh. I might not be a Level 9  Discussions user, but I’ve been an Apple Technician for more than a decade now. So believe me, I know what I’m talking about. Be it OS X Server or emptying the Trash. But even I come here from time to time to learn from others. Well, back to topic and being a little more specific:
    The 'My Info' setting always belongs to the first iCloud account you add to an iOS device. In this account you create at least 1 contact, the one you will be using for 'My Info'. You then do the same on your other iOS device using NOT the same iCloud account, of course. You only need to enable contacts syncing in iCloud preferences for these primary accounts. From here on you can use differing 'My Info' on your 2 iOS devices without a problem.
    But you may know that you can use more than one iCloud account at a time. Only the primary one will offer all iCloud options like Photostream. But what they all offer is contacts, calendars, etc. So if you intend (and I did) to share these 2 between your devices you can add them using a second iCloud account to both of your iOS devices. This makes it 3 accounts all in all. You could even go further and add another one just for 'Find my iPhone' if you like.
    I would’ve used the built-in sharing of Calendar.app instead, but Contacts.app does not (yet) offer sharing contacts with others. That’s why I went with the third iCloud account as a secondary account to both iOS devices.
    Apple of course recommends using just one Apple ID for everything to make it easier. But in some scenarios this just won’t cut it, which is even described in one of their support documents.
    I hope that now you have an idea what I’ve done…
    Good night
    Björn
    PS: It would be nice if people did not insist on being right. They too can sometimes learn something!

  • How to use standard function keys as custom keys

    how to use standard function keys as custom keys.
    i have encountered that problem while developing a screen, there i'm supposed to use standard function key F2 ( which actually meant for choose) for clearing the screen fields where the cursor is present and f1 for saving data that entered in screen fields, etc...
    kindly help me out.

    Hi ,
    Solution to use SAP reserve function keys F1 .. F4 (mostly this requirement comes up for RF screens) can be acheived by assigning your new Function code using the Menu path Utilities --> F key Consistency in the Menu Painter (SE41) . Once you assign your cutom function code to the standard Fn keys the only remaining step is to make sure that you set a curson on any of the field on sceen by using the Key Word "SET CURSOR" .
    If you dont use the key word SET CURSOR in the PBO of the screen then you might not see any response for F4.
    Thanks

  • Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.

  • How to use shared parameter on request set

    Hi
    I have a request set with two stages
    First stage contains From Date and To date where i have named the shared parameter as StartSP and EndSP
    i have to use these shared parameter in one of the query in next stage where my Type is SQL Statment and i have these two date fields From date and To date in next stage as well where i am able to retirve the values from previous stage
    based on these values i need to get the name in next parameter where my Type is SQL Statment
    select name from tablename where '02-MAR-09' > =start_Date and '29-MAR-09' <=end_Date
    I have written SQL as
    select name from tablename where StartSP > =start_Date and EndSP <=end_Date but it throws an error.
    I need the values of 02-Mar-09 and 29-Mar-09 from StartSP and EndSP
    Appreciate if any one has idea about this.

    hi user;
    please check:
    http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/repset04.htm
    http://download-east.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/10gch609.htm
    Also you can check this search:http://www.google.com.tr/search?hl=tr&source=hp&q=How+to+use+shared+parameter+on+request+set+&meta=&aq=f&oq=
    Hope it helps
    Regard
    Helios

  • How to use shared variables?

    Hello..
            Can anybody please guide me in using shared variables... I'm learning LabVIEW 8.5.... But did not understand how to use shared variables... I tried to read web pages regarding shared variables but got confused.... So anyone can please help me...?
             Thanks for any help from you...

    You will have to give us the whole picture. What is your client computer; a PAC, desktop etc? What are you running on the client computer; a VI or an executable? Where are you going to deploy your library? On the host machine or the client machine?
    If I assume that you are running a VI on the client machine and are depolying the library on the host, all you have to do is to create another shared variable and bind it to the variable on the host machine. You can do this by checking the Bind to Source option when creating the variable and browsing to the network item in options. Be sure to have the library deployed on the host side before you attempt to do this otherwise you won't be able to find the variable.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How do use my ITunes balance to pay for Apps

    How do use my ITunes balance to pay for Apps?

    You just buy what you want.  If you have a credit (balance), it is automatically used before you are billed (if you run over your balance).
    How to manage unused iTunes Gift Card and Gift Certificate balances
    "Each time you purchase content, iTunes will deduct funds from the credit until it's depleted."

  • How to use same Data Type and Length for two fields

    How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
    SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
    FROM bsik
    INTO TABLE it_bsik
    WHERE bukrs = p_bukrs
    AND lifnr IN s_lifnr.
    IF it_bsik IS NOT INITIAL.
    SELECT belnr gjahr awkey awtyp
    FROM bkpf
    INTO TABLE it_bkpf
    FOR ALL ENTRIES IN it_bsik
    WHERE belnr = it_bsik-belnr
    AND gjahr = it_bsik-gjahr.
    IF it_bkpf IS NOT INITIAL.
    SELECT belnr gjahr lifnr xblnr
    FROM rbkp
    INTO TABLE it_rbkp
    FOR ALL ENTRIES IN it_bkpf
    WHERE belnr = it_bkpf-awkey+0(10)
    AND gjahr = it_bkpf-awkey+10(4).
    ENDIF.
    ENDIF.
    Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
    Kindly clarify.

    Hi Saurabh,
    Please see the example code that I have developed for you. It will help you solve the problem.
    REPORT ZTEST_3 .
    tables : BKPF.
    data : begin of it_bkpf occurs 1,
             belnr type RE_BELNR,
             awkey type awkey,
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf.
    data : begin of it_bkpf1 occurs 1,
             belnr type RE_BELNR,
             awkey type gjahr,              " change the data type
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf1.
    data : begin of it_rbkp occurs 1,
             belnr type BELNR_D,
             gjahr type gjahr,
             lifnr type LIFRE,
             xblnr type XBLNR,
           end of it_rbkp.
    select belnr
           awkey
           awtyp
           gjahr
           from bkpf
           into table it_bkpf
           where BUKRS = 'TELH'.
    loop at it_bkpf.
    it_bkpf1-belnr = it_bkpf-belnr.
    it_bkpf1-awkey = it_bkpf-awkey+10(4).           "Here only append the required length.
    it_bkpf1-awtyp = it_bkpf-awtyp.
    it_bkpf1-gjahr = it_bkpf-gjahr.
    append it_bkpf1.
    clear it_bkpf1.
    endloop.
    select  belnr
            gjahr
            lifnr
            xblnr
            from RBKP
            into table it_rbkp
            for all entries in it_bkpf1
            where belnr = it_bkpf1-belnr
    This is just an example. Change the fields according to your requirement.
    Regards
    Abhii
    Edited by: Abhii on Mar 9, 2011 9:08 AM

  • How to use sharing to find a stolen laptop

    I saw a news story about a guy whose laptop was stolen. He accessed the laptop remotely and watched the activity on it. He finally saw the thief enter his name and address to register on a web site, then he sent the police to that address and they recovered the laptop. (That was a windows machine.) I saw another article - a few months ago - about a stolen Mac laptop that was recovered when the woman who owned it accessed it remotely and used the built-in camera to take a picture of the thief. Cool stuff - which I could not do!
    I use a Mac laptop as my only computer, and I travel a lot. If it got stolen, I'd like to be able to access it remotely and try to recover it. I looked at the sharing preferences, and there are ten different options that can be turned on or off. And the descriptions of each of those options are very minimal.
    After reading the news stories about people who recovered their stolen laptops, I'd really like to know how to set up sharing services on my Mac to be able to do the same thing.
    Are there any articles or web sites or support notes on the topic of "How to set up and use sharing to recover a stolen Macintosh"? If there are, can you direct me to them? If not, this would a great article or support note for somebody to write.
    What sharing services would you turn on? If there are configuration options for those services, how should the options be set? If the computer is stolen, what actions would take to track the computer and try to recover it?

    that's correct but there are ways around that too (if one knows them). physical access to the computer trumps any safeguards you can put. of course, not every thief would know how to circumvent a firmware password. Still, it's not such a great secret. the method has been discussed many times on this forum for example. I'm not trying to discourage you from buying the software. I just wanted to explain that none of this is foolproof.

  • How to use shared variables to address multiple Watlow controller​s on the same COM port

    Hello,
    I am trying to use LabVIEW 2010 to control 4 Watlow temperature controllers on one COM port. 3 are Model 96 and 1 is an EZ zone controller. Each controller has a unique modbus address, and I am trying to read from and write to individual registers (such as closed loop setpoint) using shared variables. I am getting return data when reading (although the data appears to be invalid), but am unable to change the value in the register by writing. How can I be sure that the Modbus server is sending commands to the correct controller?
    Chuck
    Solved!
    Go to Solution.

    Peter,
    Thanks for the reply. I have actually solved that problem. I realized that the Modbus server address has to be the same as the controller's Modbus address.
    I have, however, run into another problem. Perhaps you could help me with that. I have a system with 4 Watlow controllers, 3 are series 96 controllers, one is PID only and 2 are ramping. The 4th controller is an EZ zone. I am using RS485 for communications and the controllers are all wired in parallel for communications and power.
    I have set up 2 Modbus servers for 2 of the controllers.
    This is the first I have ever worked with Modbus based communications. I have successfully programmed using the Modbus read/write VIs, and am wanting to move to shared variables. My questions right now revolve around addressing, Modbus I/O servers and COM ports. Specifically, at this point, I know the addresses need to match up between the server and the slave device (Watlow controller in my case), how many servers can I create and use on one COM port? If the number is limited, is there a way I can specify an address that I want the server to talk to? Will the broadcast mode work to request data values from the controllers?
    I'd appreciate any information you can help me with, or if you could point me to some sort of concise 'How-To' for Modbus communication.
    Thanks.
    Chuck

  • How to use shared variables with native c programs

    Hello
    What is the way to use shared variables with native c programs?
    I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.
    Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.
    Thanks in Advance

    Hi user42,
    with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
    In order to do this you need to have and DataSocket 4.3 or higher installed.
    Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
    http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False
    With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).
    Datasocket with LabWindows/CVI and LabVIEW Real-Time:
    http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument
    Daniel
    NIG

  • How to use the Function keys as function keys instead of action keys?

    When I press F1 or any of the other F keys it does what the symbol says on the key (volume/skip track etc).
    How do I actually use the F keys and not the symbols?

    Hi again John,
    ...is there a way to switch that around so I use the "fn" key for sound etc?
    Do the following:
    1. Fire up System Preferences
    2. Select Keyboard & Mouse
    3. Select the Keyboard tab.
    4. Tick the "Use all F1, F2, etc. keys as standard function keys" box.
    That's it. You have now reversed the default use of the function keys. If you need to increase/decrease sound, brightness etc then press 'fn' plus the appropriate function key.
    Kryten

  • How do use startdard function key in windows?

    I found out from the internet how to use function keys without pressing Fn key by configuring preference. However I need to do the same thing in windows (I am running windows XP on the same laptop).
    Anyone knows how to? I can not figure it out.

    Have you installed all the necessary Boot Camp drivers for Windows?

Maybe you are looking for