Key RSA for EMV

Hi all

According to the EMV standard, we demand that two RSA keys.

(1) issuing RSA keys (will use little 1408)

(2) ICC of RSA keys (will use little 1152)

Here is the private RSA keys of the transmitter, use to calculate the ICC public key certificate. An EMV card contain various tag as 8F, 90 (issuer public key certificate) 9F46 (ICC PUBLIC KEY CERTIFICATE) etc that use in SDA/DDA.

In fact, I want to calculate these values all (using Java) and want to perform the operation of SDA/DDA by my own understanding.

Here I have need clear RSA keys that I'll use the computation of tag as well as the operation of SDA/DDA.

EMV also have DGI8201-8205 that contian a RSA private key of CCI in CRT format.

Could any body tell me how can I get the RSA keys that can solve my purpose and can be used in the calculation of the EMV. Thanks in advance.

Hi all

I got the right answer to StackOverflow. You can check it out here. http://StackOverflow.com/questions/31831367/test-RSA-keys-for-EMV-card/31848282?NoRedirect=1#comment51634680_31848282

Tags: Java

Similar Questions

  • ASA public 8.4 + key RSA for the SSH user authentication

    I saw in another post and the configuration guide in the community of support this key public RSA authentication is in favor of the SSH sessions at 8.4 and after.  I tried this implementation on an ASA 8.4 and a 9.1 ASA and I get the same error on both.  I tried specifying SSH version 2 to see if that is the question, but I still get the error.  Y at - there a step I'm missing?

    Here is the result of the configuration commands:

    ciscoasa (config) #username test nopassword privilege 15

    attributes of test #username ciscoasa (config)

    ciscoasa(config-username) # ssh publickey authentication

    ^

    ERROR: % name host not valid

    The above links:

    https://supportforums.Cisco.com/thread/2150480

    http://www.Cisco.com/en/us/docs/security/ASA/asa84/configuration/guide/access_aaa.html#wp1053558

    http://www.Cisco.com/en/us/docs/security/ASA/asa91/configuration/General/aaa_servers.html#wp1176050

    Thank you!

    My version is 8.4 (4).

    Tried to do it on another vith asa 9.1 and no luck.

    Fact a little research, and it turns out that this feature was launched in 8.4 (4) and not available for later versions.

    So, probably, your 8.4 is meadow (4) output and it was not available at the time and in your 9.1 is not available either)))

    Here is the document:

    http://www.Cisco.com/en/us/docs/security/ASA/roadmap/asa_new_features.html

    Take a look at the table 10.

  • Create new keys SSL for Weblogic

    I want to activate SSL for servers of IOM - which means that I must be able to access the URL sysadmin and identity via https. I activated SSL in the console of the managed server, but it does not work.

    While I was looking at the doc Doc-ID 1218695.1 and in the doc under Doc ID 1230333.1 they took the measures. I follow the similar steps for my application server, but for the IOM weblogic servers, I need to use the keystore DemoTrust.jks as I have other certificates imported into them. So I can generate a new key using the following command with an existing key file?

    keytool - genkey-alias alias aliases1 - keyalg RSA - keysize 2048 -keystore < I want to use the existing DemoTrust.jks here > - dname "CN = xxx, OU = xx, O = C = xx, xxx, L = xx, S = xx" - storepass xxxx - xxxx keypass.

    I would send the key generated for approval, then import the root and certificates approved in DemoTrust.jks. Is there anything else I need to do?

    Thank you.

    genkey generates a self-signed certificate. If you want to send to a CA for signature, then you will need to use certreq option instead. You can use an existing key file if you wish.

  • SSH - private key location for ESXi?

    After generating RSA SSH keys to allow SSH without password from host ESXi5 to another SSH server, where is the private key file? The default location is/root/.ssh, which does not exist under ESXi5.  Does go in .ssh?  Has anyone implemented on ESXi5 and find out where the private key used for sessions outbound SSH is stored?

    Save them under here

    / etc/ssh/Keys-root/authorized_keys

  • Invalid key exception: no type of key: public key RSA Sun, 1024 bits

    I'm trying to recover Microsoft Keystore certificates and extract its key using SunMSCAPI in the jdk 1.6. It gives me an exception for invalid key when I try to wrap the symmetric key (what was once to perform AES encryption on data), using the RSA algorithm.

    Code snippet:
               // RSA 1024 bits Asymmetric encryption of Symmetric AES key              
                // List the certificates from Microsoft KeyStore using SunMSCAPI.
                      System.out.println("List of certificates found in Microsoft Personal Keystore:");
    
                       KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI"); 
                       ks.load(null, null) ;
                       Enumeration en = ks.aliases() ;
                       PublicKey RSAPubKey = null;
                       Key RSAPrivKey = null;
                       int i = 0;
                       while (en.hasMoreElements()) {
                            String aliasKey = (String)en.nextElement() ;              
                            X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey) ;     
                            String sss = ks.getCertificateAlias(c);
                            if(sss.equals("C5151997"))
                            {
                            System.out.println("---> alias : " + sss) ;
                            i= i + 1;
                            String str = c.toString();
                            System.out.println(" Certificate details : " + str ) ;
                          RSAPubKey = c.getPublicKey();
                            RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
                            Certificate[] chain = ks.getCertificateChain(aliasKey);     
                            }
                       }
                       
                       System.out.println("No of certificates found from Personal MS Keystore: " + i);
                    
                // Encrypt the generated Symmetric AES Key using RSA cipher      
                        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());            
                       rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
                       byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);    
                       System.out.println("Encrypted Symmetric Key :" + new String(encryptedSymmKey));
                       System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
                       
                       // RSA Decryption of Encrypted Symmetric AES key
                       rsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
                       Key decryptedKey = rsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
    Output:

    List of certificates in Microsoft personal Keystore:
    -> alias: C5151997
    Certificate details:]
    [
    Version: V3
    Object: CN = C5151997, O = SAP - AG, C = OF
    Signature algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

    Key: Sun public key RSA 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    Validity: [from: Mon Jan 24 18:17:49 IST 2011,]
    [To: Wed Jan 23 18:17:49 IST 2013]
    Issuer: CN = SSO_CA, O = SAP - AG, C = OF
    Serial number: [4d12c509 eb85 00000005]

    Certificate extensions: 6
    [1]: ObjectId: 2.5.29.14 criticality = false
    [SubjectKeyIdentifier
    [KeyIdentifier
    0000: 07 E5 83 A1 B2 B7 DF 6 b 4 b 67 1 and 9 D 42 C9 0 D F4... kKg... A.M..
    0010: 35 76 D3 F7 5v...
    ]
    ]

    [2]: ObjectId: 2.5.29.35 criticality = false
    [AuthorityKeyIdentifier
    [KeyIdentifier
    0000: E4 C4 2 93 20 AF DA 4 C 53 68 4A C0 CE E7 F2, 30. .. L.ShJ... 0
    0010: 0C 3 B 8 C 9 A. ;.
    ]

    ]

    [3]: ObjectId: 1.3.6.1.4.1.311.21.7 criticality = false
    Unknown extension: coded DER BYTE string =
    0000: 04 30 30 2 06 26 2 b 06 01 04 01 82 37 15 08 82.00... & +... 7...
    0010: D1 E1 73 E4 84 FE 0B FD 84 8 B 15 83 E5 1B 90 83... s.............
    0020: 43 81 62 84 B1 A1 E6 DA 50 14 02 01 64 02 9TH D3... C.b... P...d.
    0030: 01 1B...


    [4]: ObjectId: 2.5.29.17 criticality = false
    [SubjectAlternativeName
    RFC822Name: [email protected]
    ]

    [5]: ObjectId: 2.5.29.15 criticality = true
    [KeyUsage
    DigitalSignature
    Non_repudiation
    Key_Encipherment
    Data_Encipherment
    ]

    [6]: ObjectId: 2.5.29.19 criticality = true
    BasicConstraints:]
    CA:false
    PathLen: undefined
    ]

    ]
    Algorithm: [SHA1withRSA]
    Signature:
    0000: B3 C5 8 66 92 F4 CC D7 ED 6 51 12 63 52 18 B9... f... mQ.c... R.
    0010: B8 A6 78 7 78 18 ED F7 DA 71 09 AE 49 23 C8 C9... .. x...x. q... I have #.
    0020: F5 2F 32 0F D1 C0 08 4 2 B 6 D 3 C B9 5F 5B B5 11. 2 /... L + m <... _ [.]
    0030: 05 D9 CA E6 F9 0 a 94 14 E7 C6 7 a 63 DB FE E5 CE... z.c...
    94 0040:48 8 c 0D 77 92 59 34 6 77 1 a 24 FE E3 C1 H...w. Y .4nw$...
    0050: 0 B 52 6 D8 HAS 7TH 22 13 71 F8 AF 17 64 4F C8 D1 D7... RJ. ». q... dO
    0060: 83 EA 2D 6a CA 7F C3 84 37 15 FE 99 73 1 D 7 C D1... - j... 7... s...
    0070:6 B4 99 09 62 B9 0F 18 33 4 66 C6 7 a 9F C0 DB m... b... 3L. FZ...

    ]
    None of the found certificates in personal key MS: 1
    Exception in thread "main" java.security.InvalidKeyException: unsupported key type: RSA Sun public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    at sun.security.mscapi.RSACipher.init(RSACipher.java:176)
    at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:129)
    at javax.crypto.Cipher.init(DashoA13*..)
    at javax.crypto.Cipher.init(DashoA13*..)
    at com.sap.srm.crpto.client.applet.CryptoClass.main(CryptoClass.java:102)

    Published by: sabre150 on July 18, 2011 03:47

    Added [code] tags to make the code readable.

    A little research indicates the key classes gets by

                          RSAPubKey = c.getPublicKey();
                               RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
    

    are sun.security.rsa.RSAPublicKeyImpl and sun.security. * mscapi *. RSAPrivateKey. It seems that Cipher objects from the SunMSCAPI provider cannot accept class sun.security.rsa.RSAPublicKeyImpl RSA public keys and that the SunMSCAPI will accept only class sun.security.mscapi.RSAPrivateKey RSA private keys.

    This came in another form a couple of years. It makes sense because the packaging/encryption with a public key does not represent a security problem (there no secret in cryptographic operations) once done outside MSCAPI can use any provider who has the ability , BUT unpacking/decryption must be done with the SunMSCAPI provider which it delegates to the MSCAPI.

    My test code of work based on your code for implementation of this approach is:

            // RSA 1024 bits Asymmetric encryption of Symmetric AES key
            // List the certificates from Microsoft KeyStore using SunMSCAPI.
            System.out.println("List of certificates found in Microsoft Personal Keystore:");
    
            KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
            ks.load(null, null);
            Enumeration en = ks.aliases();
            PublicKey RSAPubKey = null;
            Key RSAPrivKey = null;
            int i = 0;
            while (en.hasMoreElements())
            {
                String aliasKey = (String) en.nextElement();
                X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey);
                String sss = ks.getCertificateAlias(c);
                if (sss.equals("rsa_key")) // The alias for my key - make sure you change it back to your alias
                {
                    System.out.println("---> alias : " + sss);
                    i = i + 1;
                    String str = c.toString();
                    System.out.println(" Certificate details : " + str);
                    RSAPubKey = c.getPublicKey();
             System.out.println(RSAPubKey.getClass().getName());
                   RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
            System.out.println(RSAPrivKey.getClass().getName());
                    Certificate[] chain = ks.getCertificateChain(aliasKey);
                }
            }
            System.out.println(ks.getProvider().getName());
            System.out.println("No of certificates found from Personal MS Keystore: " + i);
            Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");//, ks.getProvider().getName());       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
            byte[] keyBytes =
            {
                1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9
            };
            SecretKey aeskey = new SecretKeySpec(keyBytes, "AES");
            byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);
            System.out.println("Encrypted Symmetric Key :" + Arrays.toString(encryptedSymmKey));
            System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
    
            // RSA Decryption of Encrypted Symmetric AES key
            Cipher unwrapRsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());       //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            unwrapRsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
            Key decryptedKey = unwrapRsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
            System.out.println("Decrypted Symmetric Key :" + Arrays.toString(decryptedKey.getEncoded())); // Matches the 'keyBytes' above
    
  • I allredy backup data, how to restore backup of key USB for windows 2008 r2 standard?

    I allredy backup data, how to restore backup of key USB for windows 2008 r2 standard?

    Hello

    The question you posted would be better suited in the TechNet Forums. I suggest you to send your query to the TechNet forum for better support.

    TechNet > Windows Server Forums > management

  • Need a code product key for a change of hard drives. I need key product for the motherboard too?

    computer, I took the hard drive was an emachine with Windows XP home. I had another computer in a place away from giving old IBM computers with no working or deleted hard drives. I put the hard drive of the computer and now its wanting a product key code. I don't know where the original XP product key is for the moment. I do not know what is the product key for the motherboard because it was a used computer. If this does not work, what are my options for access to the info on my hard drive another way?

    The license for installing XP on an eMachines computer will be an OEM is restricted to use on this computer. It cannot be moved to an another computer/motherboard.

    If you want to make true on the new computer, first check and see if this computer has a COA OEM sticker on the case.

    If so, then you have use the product key update tool to change the key and then probably activate by phone.

    If this isn't the case, then your only hope is to see if you can find a reputable provider with stock of XP Home and purchase who then use the tool to update product key with the new key.

    http://www.Microsoft.com/genuine/selfhelp/PKUInstructions.aspx

  • lost the key code for my xp prof oem__

    I lost the key code for my xp pro oem is possible to recover it

    Is the problem that you reload your software and you do not have the key?  Normally, the product code is on the label on the material (the certificate of authenticity (COA)).  You have "lost", too?  If it's a laptop, it is usually on the bottom.  If yours is a desktop system, it can be on any of the five sides (but usually not the background).  It may be also on a thin brochure.

    More information can be found at: http://www.microsoft.com/howtotell/coa

    If you have actually lost the label, you should be able to contact the original equipment manufacturer (OEM) with your proof of purchase and service number and get help with this question.

  • My CD key is for Xp, but I got a free upgrade to Vista, how can I get a new CD key now its saying that my Windows is not genuine?

    I have a HP Pavilion laptop, which came with XP on it and XP key on the back sticker. However, when I bought it, it came with a free Vista Upgrade, that I used. Now several years later it says that my copy of Vista is not authentic, but I can't get the CD key to verify that the CD key is for XP, not Vista.

    Any ideas of how to fix cela, or should I just try it backward on a XP machine with old code?

    Thank you!

    Hello

    Did you change your computer?

    I suggest you follow the link and check.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_install/Windows-is-showing-as-not-genuine/6efea9fd-70a9-4530-88c8-93fd7b2d5484

    I also suggest that you follow the link and check

    Genuine Windows: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows/help/genuine/FAQ

    Windows could not be validated as authentic

    http://Windows.Microsoft.com/en-us/Windows/help/genuine/validation-error

  • What can I do if I can't read that the key is for Windows because of the part of the key on the sticker has rubbed off and must be re-installed Windows?

    The key to Windows inlegible sticker, want to reinstall windows

    What can I do if I can't read that the key is for Windows because of the part of the key on the sticker has rubbed off and must be re-installed Windows?  The product ID is located under the control panel > system maintenance > system > Windows Activation of a useful?  I don't want to end up with a Clipboard after that reinstalling Windows because I have a legitimate copy of Windows, but the key became disfigured over time, since it's on the bottom of the laptop.  I have Windows Vista Home Premium SP 2 running on a Dell Inspiron it's way outside the guarantee of its window.

    Thank you!

    Hello

    If you have a product key on a sticker in your computer, this means that you have an OEM product key. If you have OEM keys, this means that the windows you have here is preinstalled.

    If you reinstall windows OEM copy, you must use either the original manufacturer recovery disk or the recovery partition. If you use one of the people, should not be put to any start-up because the windows OEM versions are technically preactivated.

    If you don't have a disc or a recovery partition, you can contact your OEM (DELL) so that they can send you a disk. Alternatively, you can contact Microsoft Support just in case. : D

  • NEED KEY PRODUCT FOR WINDOWS 7 TO HIGH-GRADE ANY FREE KEY

    CAN I GET A KEY PRODUCT FOR WINDOWS 7 FOR FREE SO I CAN ACTIVATE POLEASE

    Windows 7 is a commercial product, you must purchase a license. It is not available for free.

    You can find software OEM System Builder of dozens of online merchants. The current price for OEM Windows 7 Professional Newegg, for example, is $ 140. When I checked a few minutes ago, Amazon offered packages OEM Windows 7 Professional from several vendors at prices ranging from $ 101 to $ 150. When I checked earlier, a package specifically designed for reconditioned PCs cost only $ 50 for a 64-bit copy.

    There is no technical limitation to prevent you from using OEM software on your computer, although this software only works for a clean install, not an upgrade. In the past, Microsoft has been remarkably inconsistent in his advice to clients on the question of whether this practice is allowed. (See "is allowed to use Windows OEM on your own PC? Don't ask Microsoft. »)

  • I don't have my key code for windows. My dealer doesn't have either. How can I retrieve the key code number?

    I don't have my key code for windows (registration card was not with the computer when I bought it).  My carrier apparently deleted the key during my computer repair code.  My retailer where I purchased the computer didn't either.  How can I retrieve my key code number?

    The Windows product key is usually displayed on the sticker on the underside of the computer.

    However, you can also get it by running the Belarc Advisor or the Magic Jellybean Key Finder.

    Google for one of those and you will find them.

  • can I use the key "reg" for windows 8 to install windows 7 (windows 8 does not work on my system)

    Windows 8 does not work on my system (at the lowest screen resolution)

    can I use the key "reg" of windows 8 to download windows 7. currently have windows 7 starter edition

    Hello
    Thank you for contacting Microsoft Community.

    Unfortunately, you cannot use the keys provided for Windows 8 for Windows 7. In any case, directly upgrade your installation from Windows 7 to Windows 8. The keys are specific to the Windows versions, editions and architectures. They cannot be used between.

  • I have Acrobat Pro DC Office license, does not accept my key.  Think that my key is for Acrobat Standard DC.

    I have a seat of office of Adobe Acrobat Pro DC, and I tried to activate it with my Acrobat Pro DC license key.  The system rejected my key and said that the key is for Acrobat Standard DC, not for Pro.  I know that the key is certainly a key to Acrobat Pro DC.  How to solve this?

    Contact support - for the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN )

  • I have lost the key code for my Adobe Acrobat Standard for Windows (CD) XI.  I had at my office and need to reinstall.  How can I get the key code?

    I have lost the key code for my Adobe Acrobat Standard for Windows (CD) XI.  I had at my office and need to reinstall.  How can I get the key code?

    There is a number on the CD.  Is it possible to contact Adobe and get the key code for this product?

    Hello

    Please check the help below document:

    Quickly find your serial number

    In the case of the volume license product, please visit: site Web of Adobe License | Serial numbers | Orders | Accounts

    Kind regards

    Sheena

Maybe you are looking for

  • Color LaserJet Pro: Help need driver for Mac Yosemite 10.10.2 for LaserJet Color Pro...

    Please help me find the driver for HP LaserJET COLOR PRO 200 for MAC OXC 10.10 YOSEMITE

  • I have a problem with my password for my MSN account.

    I'm having a problem with my password for Windows Live.  It does not recognize the sensitive passwords case.  I asked cela before and you refered me to Windows Live.  And I give them credit.  They tried several times to fix my problem and failed.  Th

  • 7360 downgrade to XP

    Greetings - just bought a refurb A58 that came pre-installed with Vista Business.  Enterprise Envirnment will require XP.  Computer starts very well as if new. I understand there is a way to downgrade to XP using another copy of XP and then calling M

  • Q10 blackBerry 10.3 buggy

    There are a lot of bugs found again 10.3. It's a kind of joke to release the total disaster in unstable. Contact app freezes after tapping "Save", so I can't add more contacts. So I added the contact on my gmail desktop, hoping that blackberry will s

  • Filter on Apex eliminated 4.2.1.00.08

    We have a server with oracle standard one installed and apex 4.2.1.00.08 and we have created a report with interactive reports application and from one moment to the other filters disappear and now we are not able to filter. We try to run our applica