Generate public and private keys within the smart card

Hi all

I use this code to generate public and private keys within the smart card.

KeyPair kp = new pair of keys (KeyPair.ALG_RSA_CRT, KeyBuilder.LENGTH_RSA_512);
kp.genKeyPair ();
PrivateKey prikey = kp.getPrivate ();
PublicKey pubkey = kp.getPublic ();

This code runs without error.

I need to obtain the public key of the smart card. So I need to get the public key to a byte array.
But I can't get these keys in array of bytes of plain text.

The methods I can get for pubkey object are

pubkey.clearKey ();
pubkey. Equals (obj);
pubkey.getSize ();
pubkey.getType ();
pubkey.isInitialized (); only these.

I use
Eclipse Version: 3.4.1 (level of agreement of the compiler = 1.4)
Jcop plugin (to connect with the real map and to test the java code in virtual card provided by JCOP)
OmniKey5321 (characters without contact) card reader

What is the reason to get those above methods pubkey object? Is it a version problem?
How can I get the public key in ordinary byte array? Is this possible?
If it is not possible, is there a way to get the public key as a certificate of export or something another solution?

If my script is not a possible strategy, how can I use private public keys to send the applet-specific data? Is there a better way to do it?

Published by: 863766 on June 6, 2011 12:16 AM
RSAPublicKey pubkey = kp.getPublic();

then

pubkey.getExponent(...); pubkey.getModulus(...);

Tags: Java

Similar Questions

  • I need to create public and private keys for the security certificate and I can not find the certificate. Where is he?

    I bought a security certificate, and the site tells me that it has been installed successfully. I need to export the certificate so that I can create public and private keys, but I can't find the certificate to do so.

    Firefox (Firefox Orange) > Options > Options > advanced > Certificates > authorities > export

  • How to get the public and private keys to use recaptcha?

    I registered with google to get a recaptcha for my Web site. I've gotten has been the key to site and the secret key! If I need to get the public and private key for muse!

    Hello

    Please use the site as a 'public key'key key and Secret as "clΘ privΘe".

    Concerning

    Vivek

  • Public and private IPs on the same Interface by using NAT Exemption/policy NAT

    I'm looking for some feedback on whether my thoughts on the installation program will run.

    Equipment: PIX 515E 6.2 (2)

    Scenario:

    The inside interface of the PIX will host 3 blocks of addresses IP - 24 public 2 blocks and 1 private/16 block. (All IP addresses have been replaced by dummy blocks.)

    Blocks of audiences:

    * 192.168.10.0/24

    * 192.168.20.0/24

    Block of private:

    * 10.50.0.0/16

    Traffic from the public 2/24 blocks should go through the firewall without address translation.

    The two blocs of the public will be able to receive connections initiated from the Internet.

    Public blocks will need to be able to send and receive traffic on a static VPN tunnel to our headquarters without subject to address translation

    Traffic leaving the sector private/16 block should be subjected to PAT before passing through the firewall.

    Private/block 16 will not receive incoming traffic from the Internet (other than responses to outbound connections initiated from within the private block).

    However, the private block will also have to be able to send and receive traffic on a static VPN tunnel to our headquarters * without * subject to address translation (i.e. hosts on our corporate network must be able to initiate connections to the private block and vice versa).

    The inside interface of the PIX will be connected to a Catalyst 3xxx series layer 3 switch, which will be responsible for routing all internal (so the PIX will never be routing of traffic on the interface, it was received).

    My ideas on how to implement are:

    * Use the exemption of NAT to exempt public address translation blocks. This will allow incoming and outgoing connections through the firewall.

    * Use the exemption of NAT to exempt the block private NAT when connecting to our head office on the VPN tunnel.

    * Use policy NAT w / PAT to translate the block private connecting to all other hosts.

    I have translated these thoughts in the following configuration snippet.

    Because the NAT exemption is processed before policy NAT in the evaluation of the NAT rules, I believe that this should allow the public IP blocks treat incoming/outgoing traffic without translation, while submitting the private translation block (except during handling of incoming/outgoing connections to our network of corporate office).

    Can someone confirm my assumptions about this?

    # ----------------------------------------------------------------------

    traffic of # which should be exempted from translation

    permit ip 192.168.10.0 access list nat_exempt 255.255.255.0 any

    nat_exempt 192.168.20.0 ip access list allow 255.255.255.0 any

    nat_exempt ip 10.50.0.0 access list allow 255.255.0.0 10.100.0.0/16

    traffic of # which should be the subject of translation

    policy_nat ip 10.50.0.0 access list allow 255.255.0.0 any

    # Suppose 192.168.5.1 is the address to use for PAT

    Global (outside) 1 192.168.5.1

    NAT (inside) 0-list of access nat_exempt

    NAT (inside) 1 access-list policy_nat

    # assumes that 192.168.10.7 is the IP address of the inside layer 3 switch

    Route inside 192.168.10.0 255.255.255.0 192.168.10.7 1

    Route inside 192.168.20.0 255.255.255.0 192.168.10.7 1

    Route inside 10.50.0.0 255.255.0.0 192.168.10.7 1

    #assume the following configuration sections appear elsewhere: static tunnel VPN, ACL, ifconfig, etc..

    # ----------------------------------------------------------------------

    Yes, this will work, even if you don't need political NAT for the 10.50.0.0 network. For PAT the 10.50.0.0 network when to anywhere (except via VPN) just do:

    Global 1 192.168.15.1 (outside)

    NAT (inside) 1 10.50.0.0 255.255.0.0

    As I said, you have works perfectly, the above is just an easier way to do it.

  • How to generate a public and private key when you use reCAPTCHA anti spam protection forms?

    Hello

    I designed my first website using muse for a customer. now, I want to insert a protection against spam reCAPTCHA. I followed the guide step by step from adobe, but when I want to log in to the google administration console, I'm stuck. can I use my login information to design companies that I have a business google account? and if so, where can I find the app because it does not appear on the console connection that I currently use.

    Help, please!

    Hello

    Please click the link below and login with google/Gmail code. you or your organization

    reCAPTCHA: easy on humans, hard on the Bots

    If you do not have a gmail id then just sign up on google.com or gmail.com.

    Concerning

    Vivek

  • Telepresence Content Server: Dissemination to the Public and private users

    *****

    Infrastructure:

    TMS 14.5 (private network)

    VCS - C 8.5.1 (private network)

    VCS-E 8.5.1 (Public network)

    S5.3 TCS (private network)

    Codian: Supervisor 8500, MSE 8510, 8321 ISDN (private network)

    *****

    New to this, so I don't know what would be the best way to do this, but basically the goal is to broadcast videos of TCS to the users of the network internal as live audiences without security problems. Try to do this without an external broadcast service.

    It is the State that works very well for internal users, but is not available to public users because it's on a private network.

    Any help is greatly appreciated.

    Thank you
    Mike

    You will need to provide public access to your Cameras, you can consult the administration of CHT Guide for a list of ports. We have our TCS on a private network and have the lanes of traffic through the network load balancers that rely on the public network to provide all access public and private.

  • A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10001.

    Hello

    I just bought an HP computer, Windows 8 Pro, x64bit. I worked OK for a week and then started to freeze. It freezes all the time. I'll send the error message in the event log. I'd appreciate your help because I've had enough of this gel and I turn it works all the time.

    Log name: System
    Source: Schannel
    Date: 12/07/2013-12:55:12
    Event ID: 36870
    Task category: no
    Level: error
    Keywords:
    User: SYSTEM
    Computer: Aleksey
    Description:
    A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10001.
    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        36870
        0
        2
        0
        0
        0 x 8000000000000000
       
        7179
       
       
        System
        Aleksey
       
     

     
        Server
        0x8009030d
        10001
     

    Thank you

    Hi Aleksey,

    I appreciate the efforts that you put to publish the query on this forum.

    Please help me with the following information about this issue:

    (1) is the computer that is connected to a domain network?

    (2) when exactly you receive the error message? It is by accessing any application?

    If the computer is connected to a domain network, I suggest you send the request on 8 Windows IT Pro. Check out the link:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w8itpro

    Please let us know if the computer is not in a domain. We will be happy to help you come.

  • When I press the Apple and R keys at the start of my old iMac just boots to the old system rather than start to install new sound system. Help

    When I press the Apple and R keys at the start of my old iMac just boots to the old system rather than start to install new sound system. Help

    Command-r does not work on a 10.6.8 system, you would need 10.7 Lion or better to do. If you try to install a new system and that you have already downloaded, then go to your Applications folder and double-click "install OS X...". »

  • I allowed to CS2, I contact Adobe support for new link and new key for the new facility for the computer updated. In the installation, I have inserted the key from ADobe that I got Adobe support, but when I open programms CS2 it will not work and gives me

    I allowed to CS2, I contact Adobe support for new link and new key for the new facility for the computer updated. In the installation, I have inserted the key from ADobe that I got Adobe support, but when I opened any CS2 program it will not work and gives me the invalid key error. What should do?

    CS2: Error: unavailable activation server | CS2, Acrobat 7, hearing 3 -.

    l http://helpx.adobe.com/x-productkb/Policy-Pricing/Creative-Suite-2-activation-end-Life.htm

    https://helpx.Adobe.com/Creative-Suite/KB/CS2-product-downloads.html

  • Peut funtion Vmotion and Storage Vmotion with Intel and AMD hosts within the same cluster

    Hi, I can do storage Vmotion OR Vmotion between Intel and AMD hosts within the same group?

    Thank you

    No, it is not possible to vmotion or storage vmotion between CPUs from different manufacturers - I heard rumors that two manufacturers are working on technology that will help in the future-

    If you find this or any other answer useful please consider awarding points marking the answer correct or useful

  • Adobe Content Server 4.1 - Cound not find the private key of the server key file

    Hello

    I get the following error when I place the Adobe Content Server 4.1.1 execution services

    type of Exception report

    message

    Description The server encountered an internal error () that prevents to satisfy this demand.

    exception

    javax.servlet.ServletException: Servlet execution threw an exception
    

    first cause

    java.lang.Error: Cound not find server's private key in the keystore
         com.adobe.adept.fulfillment.security.ServerConfig.init(ServerConfig.java:156)
         com.adobe.adept.fulfillment.security.ServerConfig.getSigningURL(ServerConfig.java:48)
         com.adobe.adept.fulfillment.servlet.FulfillmentServerStatus.getServers(FulfillmentServerStatus.java:34)
         com.adobe.adept.common.servlet.Status.checkUp(Status.java:355)
         com.adobe.adept.common.servlet.Status.doGet(Status.java:424)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    

    Note Track of the full stack of the root cause is available in the Apache Tomcat/6.0.20 logs.

    --------------------------------------------------------------

    My accomplishment - conf.txt contains following:

    com.adobe.ADEPT.log.Level = trace

    com.adobe.ADEPT.log.file=C:\acs4\log\fulfillment.log

    com.adobe.adept.persist.sql.driverClass = com.mysql.jdbc.Driver

    com.adobe.ADEPT.Persist.Sql.Dialect = MySQL

    com.adobe.ADEPT.Persist.Sql.Connection = JDBC:MySQL://127.0.0.1:3306 / adept

    com.adobe.ADEPT.Persist.Sql.User = acesdbuser

    com.adobe.ADEPT.Persist.Sql.Password = *.

    com.adobe.adept.serviceURL = http://127.0.0.1:8080 / execution

    com.adobe.adept.fulfillment.security.licensesignURL = https://nasigningservice.Adobe.com/licensesign

    com.adobe.ADEPT.Fulfillment.Security.keystore = PKCS12

    com.adobe.ADEPT.Fulfillment.Security.PKCS12.file=file:///C:/ACS4/Operator.P12

    com.adobe.ADEPT.Fulfillment.Security.keystore.User = operator4acs

    com.adobe.ADEPT.Fulfillment.Security.keystore.Password = *.

    Any idea?
    Kind regards

    Are you sure that you have created the file with the correct .p12 '-name ' friendly name? The value-name must match the com.adobe.adept.fulfillment.security.keystore.user value

  • question on the smart card's mutual authentication process

    I have a question about the process to authenticate each other between the smart card and the host application.

    Basic knowledge
    As far as I understand, use of the host application the KMC to derive the static key, the value of the card and this set of keys, the host application creates the set of session keys. He uses this session defined key to check the cryptogram of the map and generate cryptogram of the host.

    Similar process is conducted by the card with the fact that static keys are stored in the vault of the smart card in the customization of the security field transmitter phase. It sends to the host application the cryptogram of the card.

    Framework
    I'm trying to review this process manually. I play the role of the host application and I have in hand the necessary cryptographic functions (Triple a) and Mac.

    Question
    I'm trying to calculate the MAC (cipher card) as described in section 5.4.1 of the CPS v1.1 (EMV card) but I can't receive the cryptogram of the card sent to me using the reference.
    Is there more than 1 function of MAC (in theory) and this MAC function varies from one card to another manufacturer?

    Thanks in advance
    Best regards
    JDL

    There may be something in the API c# BouncyCastle (I don't do much dotnet so I have not tried) http://www.bouncycastle.org/csharp/

    The MAC is relatively simple. There is a line where you encrypt a block of data at a time (as opposed to entire entry) and feed the result of an iteration in the next as the ICV (initial vector chaining). The original ICV value is 0x00 all.

    See you soon,.
    Shane

  • 8460p: keep the smart card reader attached, even if the card is removed

    HP EliteBook 8460p

    Win 7 Pro 64-bit

    When a smart card is inserted, you are able to see your smart card reader in Device Manager. When you remove your card chip, the chip card reader disappears in Device Manager. Is it possible to always keep the smart card reader attached?

    According to the BIOS version (F.22) will there is a fix where you can set the power state of the smart card reader:

    '- Fixes an issue where the setup of BIOS (F10) does not display the power of smart card Options once the system is restarted. -Fixes an issue where rebooting the system (reboot) is slow after the modem is turned off in the configuration of the BIOS (F10). »

    But this isn't the case to find.

    Any suggestions?

    Concerning

    F27 BIOS and the new card reader is needed to solve this problem.

    old player = v1.20

    new player = v1.21

    /paasen

  • Smart card reader driver is sought on Windows update after inserting the smart card

    We are in the process of deploying PKI project in our environment. Client computers have Windows 7 Enterprise 64-bit SP1. We use McAfee Endpoint Encryption 5.2.12 on all clients. Our environment has a mix of Dell (Latitude E6400, E4300, E4310, E6410, E6420) and HP (EliteBook 8460p, EliteBook 2560p) laptops. There's no problem with Dell laptops at all.

    With HP machines, however there are two problems.
    1. with the model 8460p, after installing the Alcor card reader driver, when I insert the smart card into the reader he begins to search for the drivers on windows update. In three minutes, it updates the drivers and works very well. My concern is when I install the card reader drivers explicitly why go to Windows update. HP 2560p also has the same card reader, but this problem is not on this model. I disabled the driver smart card research in strategy group as well. This behaviour is sparkle roll.
    2. when I enable smart card authentication on the McAfee console for any HP laptop and try to use my smart card on McAfee Endpoint encryption pre boot screen, machine freezes. Same configuration of McAfee encryption works fine on Dell laptops.
    Help, please.

    Hello

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT audience Pro on Microsoft TechNet. Please post your question in the TechNet forum. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    Hope the above information is helpful.

  • big problems after the installation of Yosemite (10.10.2) with Photoshop CS6... The program crashes - last time 10 times during my working session... wacomtable does not work... It's slow... and receive errors on the graphics card... It s a terror to work

    big problems after the installation of Yosemite (10.10.2) with Photoshop CS6... The program crashes - last time 10 times during my working session... wacomtable does not work... It's slow... and receive errors on the graphics card... It s a terror to work with my beloved Photoshop!

    Yosemite upgrade very often damage existing Photoshop.  I thank Apple for that.

    You must uninstall and reinstall Photoshop, then apply all the updates of Photoshop from scratch.

    But first, give us details about your configuration:

    STANDARD TEXT:

    Note that it is standard text.

    If you give complete and detailed information on your configuration and the issue,

    as your platform (Mac or Win),.

    accurate versions of your operating system, Photoshop (not just "CS6", but something like CS6v.13.0.6) and the bridge.

    your settings in Photoshop > Preferences > performance

    the type of file you were working.

    specifications of the machine, such as total installed RAM, scratch file HDs, total available disk space, video card specifications, including total VRAM installed.

    What troubleshooting steps you have taken so far

    what you receive, error messages

    If problems of opening raw files also the exact camera brand and model that generated

    If you experience problems printing, specify the exact brand and model of your printer, the size of the paper, the dimensions of the image in pixels (so many pixels wide by pixels high). If going through a TEAR, specify that too.

    A capture of your settings, or the screen image could be very useful also,

    etc.,.

    someone may be able to help you (not necessarily this poster, which is not a Windows user).

    Read this FAQ to get advice on how to ask your questions correctly to get faster and better answers:

    http://forums.Adobe.com/thread/419981?TSTART=0

    Thank you!

Maybe you are looking for

  • Question about repair screen on Satellite P20-S504

    Hello I have a SP20-504 (17 "widescreen, 3.2 GHz processor) that has been abandoned.Apart from the apparent defects, the screen does not work. If I shine a torch on the screen, I see the screen still works and the VGA function works fine. Someone at

  • FedEx invoice when ordering photo book of the Canada

    This year, like the past (at least) of seven, we ordered five Apple picture books (Christmas gifts). We live in the Canada, and books are shipped from Ohio. I received a FedEx Bill for the costs of promotion $10 (plus taxes). I assume this has someth

  • External backup drive is de-energized regularly

    Hello I use a network and wifi Time Capsule backup 4 separate computers. Some connect to the drive internal TC, some on a 4 TB external drive connected by USB to the TB. Once records have been chosen through the Time Machine preferences panel, everyt

  • How to rotate a group of objects in 3d photo

    There are examples on how to rotate an object independently as the solar system.  However, I am having a challenge that I created one side of the rubik's cube that has several small cubes in ti and want to rotate just a row of small cubes on the face

  • How to cancel ' files waiting to be burned to disc "?"

    I tried to burn files to a disc, but when I received the message that the files are too big for my drive, I didn't know how to reduce the number of files.