Elliptic curve coprocessor in JCOP

I have some JCOP41/72K cards with support to ECC.
I suppose the cards come with a coprocessor that performs the elliptic curve operations in binary fields, like reduction modulo irreducible polynomial and escalar multiplication of a point.
I've already developed a signature scheme (ECDSA) in these cards using Java Card API.
In ECDSA, the card performs all elliptic curve operations and gives the result.
These operations are perfomed by the coprocessor in a transparent way when I ask to compute a ECDSA signature.
Now I would like to develop other cryptosystems based on bilinear pairings.
So I need to perform operations like reduction modulo irreducible polynomial and escalar multiplication of a point.
Does anybody know if its possible to access the functionalities of the elliptic curve coprocessor of JCOP cards?
If its possible, how can I do this?
Thanks.

Ok. Thanks for your reply.
Please, could you answer the following questions or
indicate where can I find the answers?
- Is there a software like JCOP Tools to work with
pure SmartMX cards? Is it free? No. You need to order pure SmartMX including the Crypto Lib from NXP directly .. best is you contact their product manager to find out the details and tools support.
- Besides the card reader that I use to work with the
MPCOS/GPK/GemXpresso/JCOP cards, is it necessary any
other hardware?Probably an emulator.
- Which programming language is used to program these
cards? C and assembler.

Similar Messages

  • What is the complexity of "Elliptic curve Pinstov Vanstone signature" algorithm?

    what is the complexity of "Elliptic curve Pinstov Vanstone signature" algorithm?

    Why do you ask? And why do you ask us?

  • Elliptic Curve

    Hi to all, i'm an italian student and i must implements the BLS signature scheme in Java. BLS work on elliptic curve over finite field F3^m. I've seen elliptic curve in Java but over finite field F2^m. The question is: how i can do? Excuse me for my english and if something that i've write is wrong.
    Thanks to all.

    Hi,
    Firstly, please check if your card supports EC cryptography. You can find this information in product data sheet or ask the card manufacturer.
    I'm not sure if you can perform data encryption or decrytpion with ECC on JC. It is rather dedicated to sign/verify operation. Please find below modification of your sample code with sign and verify example.
            byte[] dataToSend = new byte[64];
            KeyPair ecKeyPair = new KeyPair(KeyPair.ALG_EC_FP, KeyBuilder.LENGTH_EC_FP_128);
            ecKeyPair.genKeyPair();
            ECPrivateKey ecPrivateKey = (ECPrivateKey) ecKeyPair.getPrivate();
            ECPublicKey ecPublicKey = (ECPublicKey) ecKeyPair.getPublic();
            Signature sig = Signature.getInstance(Signature.ALG_ECDSA_SHA, false);
            sig.init(ecPrivateKey, Signature.MODE_SIGN);
            short resLen = sig.sign(new byte[]{0,1,2,3}, (short)0, (short)4, dataToSend, (short)0);
            sig.init(ecPublicKey, Signature.MODE_VERIFY);
            if (!sig.verify(new byte[]{0,1,2,3}, (short)0, (short)4, dataToSend, (short)0, resLen))
                ISOException.throwIt(ISO7816.SW_WRONG_DATA);
    Regards

  • Java Card and Elliptic Curves

    Hi all,
    has anyone ever used Elliptic Curve cryptography on a Java Card? I can't find any documentation and sample code about this topic, although it should be implemented in the new java card specifications.
    I would like to use ECC instead of RSA for encrypting a message and verifying a signature on a java card with a EC pubkey.
    If anyone could provide me with sample code or hints, that would be very helpful!
    Thanks in advance,
    Matthias

    has anyone ever used Elliptic Curve cryptography on a
    Java Card? I can't find any documentation and sample
    code about this topic, although it should be
    implemented in the new java card specifications.No, it can (not should) be implemented. The implementation of all cryptographic algorithms is optional.
    I would like to use ECC instead of RSA for encrypting
    a message and verifying a signature on a java card
    with a EC pubkey.
    If anyone could provide me with sample code or hints,
    that would be very helpful!The sample code wouldn't be too complicated to create (should be very similar to using RSA) but where do you execute this code? All emulators/simulators and the real Java Cards I know do not support ECC.
    I only heard rumours that "Trusted Logic" has Java Cards which support ECC, but I haven't checked that.
    Jan

  • Flexiprovider, Elliptic curves

    Hi,
    has anyone used Flexi's class Point and PointGFP?
    Their arithmetic operations in particular and initializing a specific curve for them.
    Thanks!
    anyone? (:
    Edited by: sk16 on Apr 17, 2010 6:33 PM

    sk16 wrote:
    has anyone used Flexi's class Point and PointGFP?I suspect that a lot of people have used these classes either directly or indirectly since they are part of the core of the Flexi encryption libraries.

  • Elliptic curve encryption with J2ME

    hi there.
    i'm using the bouncycastle apis to encrypt a small amount of data (e.g. 20 chars) using ECIES. All the documentation seems to point to ECC as being faster/requiring shorter keys/less power-hungry etc than RSA, however, with the example code I have, the encryption time on a high end mobile is ridiculous.
    I'm thinking that the example G, n, a, b, and Q are for larger key sizes. Does anyone know how I can generate these values for a 160b ECC key, or a good bouncycastle/j2me ECC tutorial/sample code?
    Thanks in advance.
    caid

    No Sun provider implements the EC algorithms at this time.
    Here's an easy solution that works (Using NSS):
    http://blogs.sun.com/andreas/entry/elliptic_curve_cryptography_in_java
    NSS has been recently FIPS re-approved.
    BouncyCastle is another option if FIPS doesn't matter to you at all and you want pure java.
    Edited by: dstutz on Mar 10, 2008 7:49 AM

  • Elliptic curve cryptography

    what are the crypto products using ECC that are undergoing coding and implementation in the software industry today?

    Depends on what type of crypto products you are referring to. If you mean libraries and tools, then Bouncy Castle has implemented it, SunJCE has implemented it, Mozilla has implemented it, CSRTool - an open-source tool for generating Certificate Signing Requests (CSR) uses it, etc.
    If you're looking for commercial implementations, then you need to ask the specific vendor(s) of the product you're looking for, to see if they use it. I know of some privately-built applications that use it, but they're not for commercial sale.

  • How to use elliptic curve encryption?

    Hi, are there any examples?
    I tried to get a key generator using KeyPairGenerator.getInstance("EC") but failed.
    And I also cannot get a cipher using Cipher.getInstance("EC").
    Thanks.

    No Sun provider implements the EC algorithms at this time.
    Here's an easy solution that works (Using NSS):
    http://blogs.sun.com/andreas/entry/elliptic_curve_cryptography_in_java
    NSS has been recently FIPS re-approved.
    BouncyCastle is another option if FIPS doesn't matter to you at all and you want pure java.
    Edited by: dstutz on Mar 10, 2008 7:49 AM

  • ECC: Unknown named curve: 1.3.36.3.3.2.8.1.1.7 (brainpoolP256r1)

    Hello,
    I've stumbled on a problem with the ECC and I would like to know if anybody did so too and what can be done.
    In our application we need to check X509 certificates. Therefor we parse them with the java.security.cert.CertificateFactory like this:
    public X509Certificate parseCertificate(byte[] encodedCertificate) {
            try {
              CertificateFactory cf = CertificateFactory.getInstance("X509");
                 ByteArrayInputStream bais = new ByteArrayInputStream(encodedCertificate);
                 X509Certificate x509 = (X509Certificate)cf.generateCertificate(bais);
                 return x509;
         } catch (CertificateException e) {
              log.log(Level.SEVERE, "Could not parse X509 certificate", e);
         return null;
    }This worked for years without any problems. Now customers have new cards by TeleSec with ECC support. Authentication and Encryption certificate are no problems but non-repudiation certificate throws error:
    Caused by: java.io.IOException: Unknown named curve: 1.3.36.3.3.2.8.1.1.7
         at sun.security.ec.ECParameters.decodeParameters(ECParameters.java:197)
         at sun.security.ec.ECParameters.engineInit(ECParameters.java:319)
         at java.security.AlgorithmParameters.init(AlgorithmParameters.java:293)
         at sun.security.x509.AlgorithmId.decodeParams(AlgorithmId.java:139)
         at sun.security.x509.AlgorithmId.<init>(AlgorithmId.java:114)
         at sun.security.x509.AlgorithmId.parse(AlgorithmId.java:381)
         at sun.security.x509.X509Key.parse(X509Key.java:168)
         at sun.security.x509.CertificateX509Key.<init>(CertificateX509Key.java:75)
         at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:705)
         at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:169)
         ... 30 moreA google-search did bring up that the Elliptic curve brainpoolP256r1 (which is the curve mentioned in the exception) seems not to be supported by the oracle JDK.
    Is there a workaround? I thought of bouncycastle. But I would prefer to use only the JDK JCE.
    Thanks!
    Stephan

    Seems that bouncycastle does the trick. Since I've switched to "BC" Provider the parsing throws no exception.
    Too bad, hopefully JDK will support ECC based Certificates soon.

  • Sun Java System Web Server 7.0 available

    I am delighted to announce that Sun Java System Web Server 7.0 is now available for download, purchase, deployment, and more.
    This release builds on the highly scalable and stable heritage of Web Server. It features an entirely re-designed Administration interface designed around clusters, easy access to frequently performed tasks, simplification of frequently performed tasks., and a fully scriptable command line interface featuring functional parity with the browser-based interface.
    In addition to the administration changes this release features:
    o Full 64-bit support for Solaris SPARC and Solaris AMD64 platforms
    o Regular expression pattern matching for URL re-writing and mass hosting
    o If/Then/Else constructs within request processing
    o Advanced sed based input and output filters
    o Dynamic loading of Certificate Revocation Lists (CRLs) without requiring daemon restart
    o Elliptic Curve Cryptography (ECC)
    o Built in request mapping for protection against abnormal load patterns and Denial of Service protection
    o WebDAV ACL support
    o Out-of-box Java support for Servlets 2.4, JSP 2.0, JSF 1.1, JSTL 1.1, JWSDP 2.0 based web services
    o Java session failover and recovery within a cluster of peers
    o Integrated HTTP reverse proxy User-Agent
    o Bundled FastCGI client for use with third party scripting environments such as Perl, PHP, Ruby on Rails, etc
    o Enhancement of perfdump, stats-xml, and SNMP as well as more ability to monitor the Java container and the ACL system
    o Much more
    The software can be downloaded from:
    http://www.sun.com/download/products.xml?id=45ad781d
    The documentation is available at:
    http://docs.sun.com/app/docs/coll/1308.3

    If 7.0 was released, how come http://www.sun.com/webserver still only talks about 6.1?

  • Cisco ACS 4.2 and Windows 2008 R2 CA

    Has anyone been successfully in getting a cert off of a 2008 R2 CA and imported correct in to ACS 4.2?  I've had and have seen other have the problem with creating a web server certificate from R2 (1024 bit) and putting it in ACS 4.2 only to have HTTPS/SSL no longer work correctly.  I haven't even tested the intended purpose of the cert (EAP-TLS) yet, so who knows if that works.  I've also seen through searching where some one was able to take a 2003 CA web server template and put it into R2 and it work, but I know longer have 2003 available?  Any ideas?
    Thanks,
    Raun

    I have seen issues where the template on the R2 boxes are using elliptical curve cryptography, basically if the template has a '#" charcter in it is what I think causes this process to be used. Try to use a template that doesnt have this in the front and then try to generate a cert against the template you created.
    Here is a snip of the guide that I am forwarding you:
    Determining Whether to Implement Cryptography Next Generation Algorithms
    For Windows Server 2008–based version 3 certificate  templates, the option exists to configure advanced cryptographic  algorithms such as elliptic curve cryptography (ECC). Before configuring  these settings, ensure that the operating systems and applications  deployed in your environment can support these cryptographic algorithms.
    http://technet.microsoft.com/en-us/library/cc731705%28v=ws.10%29.aspx
    Screenshots in another article:
    http://technet.microsoft.com/en-us/library/cc725621%28v=ws.10%29.aspx
    Thanks,
    Tarik Admani

  • I am having problems donloading and editing .asx files

    I am trying to edit some video that can only be downloaded in .asx format. It is drm-ed. I may just have to contact the poeple I am partenring with that I need the original video files but I will need to do this with many of the cliebts that I am partnering with. Not only will it become a nuisance and make my business move as though stuck in the mud...it makes it hard for me to trumpet the relative merits of Apple anything electronic in the world if I have to get parralel or something so that I can run (gasp) Windows.
    Please help!
    If there is another section I should post this in let me know. i figured Fimal Cut would be where the most knowledgeable amble about.

    FCE is video editing application. ASX are not video files, they're metadata information. By the sound of it you haven't downloaded the video files at all. ASF is a Windows format used for streaming, not for download.
    The ASX Format
    ASX (Advanced Stream Redirector) files are not media files, but metafiles.
    Metafiles provides information about files. ASX files are plain text files used to describe multimedia content:
    <ASX VERSION="3.0">
    <Title>Holiday 2001</Title>
    <Entry>
    <ref href="holiday-1.avi"/>
    </Entry>
    <Entry>
    <ref href="holiday-2.avi"/>
    </Entry>
    <Entry>
    <ref href="holiday-2.avi"/>
    </Entry>
    </ASX>
    The file above describes three multimedia files. When the ASX file is read by a player, the player can play the files described.
    Advanced Systems Format (formerly Advanced Streaming Format) is Microsoft's proprietary digital audio/digital video container format, especially meant for streaming media. ASF is part of the Windows Media framework.
    The format does not specify how (i.e. with which codec) the video or audio should be encoded; it just specifies the structure of the video/audio stream. This is similar to the function performed by the QuickTime, AVI, or Ogg container formats. One of the objectives of ASF was to support playback from digital media servers, HTTP servers, and local storage devices such as hard disk drives.
    ASF is based on serialized objects which are essentially byte sequences identified by a GUID marker.
    The most common filetypes contained within an ASF file are Windows Media Audio (WMA) and Windows Media Video (WMV). Note that the file extension abbreviations are similar in name to the codecs of the same name but are different things.
    ASF files can also contain objects representing metadata, such as the artist, title, album and genre for an audio track, or the director of a video track, much like the ID3 tags of MP3 files.
    Files containing only WMA audio can be named using a .wma extension, and files of only audio and video content may have the extension .wmv. Both may use the .asf extension if desired.
    Certain error-correcting techniques related to ASF are patented in the United States (United States Patent 6,041,345 Levi, et al. March 21, 2000) by Microsoft. Although the format is publicly documented by Microsoft, its license limits implementations to closed-source development projects only. Apple's iTunes software (for Windows) now has the capability to convert WMA files to any iTunes-supported format.[1]
    The ASF container provides the framework for digital rights management in Windows Media Audio and Windows Media Video. An analysis of an older scheme used in WMA reveals that it is using a combination of elliptic curve cryptography key exchange, DES block cipher, a custom block cipher, RC4 stream cipher and the SHA-1 hashing function.
    ASF files have MIME type application/vnd.ms-asf or video/x-ms-asf. (Advanced Stream Redirector (ASX) files also have MIME type video/x-ms-asf.)
    ASF container-based media is usually streamed on the internet either through the MMS protocol or the RTSP protocol.

  • How to setup an ikev2 VPN with public key authentica​tion with your BB10 device

    This setup will allow you to run a VPN between your BB10.2 (and probably BB10.1) device and a debian linux computer (I am running the testing stream).  You will need to tweak this config (and possibly install strongswan server on your LAN's gateway) to get access to network resources, or access the internet via the VPN.  I have created this setup with the intention of accessing files/services on the debian computer only.
    1.  Install strongswan on your debian machine(I have v4.6.4 installed, I think the current testing version is v5.1.  If you install v5+, some lines in the config may be obsolete), and install any other extra packages you are prompted to install: 
    apt-get install strongswan strongswan-ikev1 strongswan-ikev2 strongswan-starter openssl ipsec-tools
    2.  Generate certificates on your debian server in any, starting with a certificate authority.  Edit the C= O= CN= fields to whatever you want:
    ipsec pki --gen --outform pem > caKey.pem
    ipsec pki --self --in caKey.pem --dn "C=CA, O=none, CN=Certificate-Auth" --san="Certificate-Auth" --ca --outform pem > caCert.pem
    Generate a server keypair (again, editing the same fields as I indicated above.  The CN= field should be lan ip address of your strongswan server.  I would also put this as the address in --san=, or you can specify your hostname(if you have one, i.e. mydomainname.com):
    ipsec pki --gen --outform pem > serverKey.pem
    ipsec pki --pub --in serverKey.pem | ipsec pki --issue --cacert caCert.pem --cakey caKey.pem --dn "C=CA, O=none, CN=192.168.1.100" --san="192.168.1.100" --flag serverAuth --outform pem > serverCert.pem
    Generate a keypair for your BB10 device (choose a CN=, and use it in the --san field @your server lan ip or hostname:
    ipsec pki --gen --outform pem > userKey.pem
    ipsec pki --pub --in userKey.pem | ipsec pki --issue --cacert caCert.pem --cakey caKey.pem --dn "C=CA, O=none, CN=bb10" --san "[email protected]"  --flag serverAuth --outform pem > userCert.pem
    3.  After generating your keys, package the client keys for your BB10 device(you will be asked to create a password): openssl pkcs12 -export -in userCert.pem -inkey userKey.pem -out bb10.pfx
    Copy the bb10.pfx file, and serverCert.pem to your BB10 device and import the certificates into the certificate store(Open Settings --> Security and Privacy --> Certificates --> Import)
    4. Move the certificates into the appropriate folders on your debian server: 
    mv caKey.pem /etc/ipsec.d/private
    mv caCert.pem /etc/ipsec.d/cacerts
    mv serverKey.pem /etc/ipsec.d/private
    mv serverCert.pem /etc/ipsec.d/certs
    5. Enable ip forwarding on your debian machine:
    edit /etc/sysctl.conf - change the following value as follows:
    net.ipv4.ip_forward=1
    Close the file and save changes.  To enable changes, type:  sysctl -p /etc/sysctl.conf
    6.  Edit config files:
              ipsec.secrets:
    : RSA serverKey.pem
            ipsec.conf:
    config setup
            strictcrlpolicy=no
            uniqueids=yes
    conn %default
            ikelifetime=60m
            keylife=20m
            rekeymargin=3m
            keyingtries=1
            keyexchange=ikev2
            leftfirewall=yes
            dpddelay=30
            dpdtimeout=120
            dpdaction=clear
    conn bb10
            mobike=yes
            ike=aes256-sha1-sha1-modp1024!
            esp=aes256-sha1!
            left=%defaultroute
            leftid="C=CA, O=none, CN=192.168.1.100"
            leftcert=serverCert.pem
            right=%any
            rightsourceip=10.10.0.1
            rightid="C=CA, O=none, CN=bb10"
            rightauth=pubkey
            leftauth=pubkey
            pfs=yes
            auto=add
    7. Start the ipsec service on your debian machine: service ipsec stop; service ipsec start
    8. Set up the VPN connection on your blackberry: Settings -->Network Connections --> VPN --> Add.
    a) Profile Name:  Give your VPN a name
    b) Server Address:  Enter your server's address
    c) Gateway Type: Generic IKEv2 VPN Server
    d) Authentication Type: PKI
    e) Authentication ID Type:  Identity Certificate Distinguished Name
    f) Client Certificate: The client certificate you imported should show up in the dropdown
    g) Gateway Auth Type: PKI
    h) Gateway Auth ID Type: Identity Certificate Distinguished Name
    i) Gateway CA Certificate:  Find the certificate authority you imported.  If you used the same name as I did above when creating the certificate, if will be called "Certificate-Auth".
    j) Perfect forward secrecy : ON
    k) Change IKE Lifetime to 3600
    l) Change IPSEC lifetime to 1200
    You can leave everything else on default settings.  Save your VPN profile.
    9. Connect to your VPN.  You should now be able to ping both ways between your blackberry and debian host.  Using the above configuration, your blackberry device will have the ip address of 10.10.0.1.

    There have been numerous bb10 updates (now 10.2.1.2977) since I first posted this mini how-to-I am not sure if it was the bb10 updates, or updates to strongswan (now v5.2.0) or my linux kernel (v3.15.3), though I am now able to use stronger hash and elliptic curve key exchange.  I am using sha384 in my example, though have also got it working with sha512.  Give it a try:
    Simply use the same process I detailed before, though change the following lines in ipsec.conf:
    ike=aes256-sha1-sha1-modp1024!
    esp=aes256-sha1!
    to
    ike=aes256-sha384-ecp521
    esp=aes256-sha384-ecp521
    Be sure to restart strongswan after you change these lines in the config.
    After this is done, change 'Automatically determine algorithm' to off in the VPN profile settings of your VPN connection profile on your blackberry.  I'm not sure why it doesn't work automatically.  State the following in this section:
    IKE DH Group:  21
    IKE CIpher: AES (256-bit key)
    IKE Hash: SHA384
    IKE PRF: HMAC-SHA384
    IPSec DH Group: 21
    IPSec Cipher: AES (256-bit key)
    IPSec Hash: SHA384

  • PKCS#11 provider - ECDSA key pair generation on token

    Hello,
    I want to generate ECDSA key pair on HSM (nCipher's netHSM) using SunPKCS11 provider and Java 6.
    After generation for all supported curve names (e.g. secp256r1) I try to call getEncoding method from PublicKey object (keyPair.getPublic().getEncoded()) and
    I get RuntimeException
    caused by java.io.IOException: "Point does not match field size"
    at sun.security.ec.ECParameters.decodePoint(ECParameters.java:75)
    at sun.security.pkcs11.P11ECKeyFactory.decodePoint(P11ECKeyFactory.java:61)
    at sun.security.pkcs11.P11Key$P11ECPublicKey.fetchValues(P11Key.java:1002)
    Keys are accessible on HSM.
    Everything is well configured and works fine with RSA keys.
    Using IAIK PKCS#11 provider I got proper values. Is it any bug in SunPKCS11 provider?
    Regards,
    MarcinP

    I recently had a problem with ECDSA and the PKCS#11 library of nCipher. Here's info from one of their engineers about the PKCS11 library:
    "There are two separate issues - one is that our current pkcs11
    release doesn't support ECDSA signature with SHA-2 hashes
    (the v11.00 firmware adds support for it, but the main release version of
    the pkcs11 library hasn't been updated to take advantage of it yet).
    There is a hotfix version that does support SHA-2 hashes with some
    restrictions, talk to [email protected] for details, and V11.10
    should be out soon and have that merged in.
    But the issue with setting CKA_SIGN is that our underlying HSM API
    allows elliptic curve keys to be either key exchange (ECDH) or
    signature (ECDSA) keys, but not both at one.
    At the PKCS #11 level, if you specify CKA_DERIVE=true and let
    CKA_SIGN default, it will default to false, and vice versa.
    If you specify both CKA_DERIVE=true and CKA_SIGN=true, then we
    return CKR_TEMPLATE_INCONSISTENT because we can't do both with
    the same key. (However, the tests using C_GetMechanismInfo will
    show that we can do both mechanisms, because we can - so long
    as you use different keys, even though they have the same PKCS#11
    type.)
    I can't comment on when or how that will be changed."
    I was using the PKCS#11 library through NSS when I ran into the problem, but I imagine Java would run into similar problems also using the PKCS#11 library. I was able to generate keypairs but not create a CSR (which required making a signature, which required SHA-2).
    Can you just use the java classes to speak to the netHSM? I've never directly written code to do so myself, but I have used Corestreet's OCSP product that uses the java classes to speak to the nCipher HSMs (though not using EC). It might work better than going through the PKCS#11 layer. There should be a java directory under NFAST_HOME that contains some jars.
    Please post back if you figure anything out as I'll probably be playing with this stuff myself soon.
    Dave

  • PKCS#11 Provider unable to fetch asymmetric keys and certificates

    Hi,
    I'm facing a problem while getting keys and certificate from Eracom HSM (ProtectServer Orange:38039 Model: PSO:PL50) using Sun PKCS#11 Provider. It gets only the symmetric keys but NEVER gets the asymmetric keys.
    My code snippet and configuration file are:
         Java Code:
         java.io.InputStream is = new java.io.FileInputStream("pkcs11.cfg");
    sun.security.pkcs11.SunPKCS11 pkcs11_provider = new sun.security.pkcs11.SunPKCS11(is);
    System.out.println("Provider Name : " + pkcs11_provider.getName());
    java.security.Security.addProvider(pkcs11_provider);
    KeyStore ks = KeyStore.getInstance("PKCS11", pkcs11_provider);
    ks.load(null, "password".toCharArray());
    java.util.Enumeration obj_enumeration = ks.aliases();
    while (obj_enumeration.hasMoreElements()) {
    String str_certAlias = (String) obj_enumeration.nextElement();
    System.out.println("Alias : " + str_certAlias);
         pkcs11.cfg:
         name = Eracom
         library = G:\Eracom\cryptoki.dll
         slot = 0
         attributes(*, CKO_PRIVATE_KEY, *) = {
         CKA_TOKEN = false
         CKA_SENSITIVE = false
         CKA_EXTRACTABLE = true
         CKA_DECRYPT = true
         CKA_SIGN = true
         CKA_SIGN_RECOVER = true
         CKA_UNWRAP = true
         attributes(*, CKO_PUBLIC_KEY, *) = {
         CKA_ENCRYPT = true
         CKA_VERIFY = true
         CKA_VERIFY_RECOVER = true
         CKA_WRAP = true
    I also ran my program without specifying any attributes in configuration file, also tried many other combination, but in all cases (with or without attributes) only symmetric keys are loaded from HSM. I am able to get all keys (symmteric and asymmteric) and certificates from the same HSM using IAIK PKCS#11 Provider. Though, the Sun PKCS#11 Provider is working fine with SmartCard tokens (Rainbow, Alladin etc.)
    Any help to resolve my problem would be highly appreciated.
    Thanks in advance.

    I recently had a problem with ECDSA and the PKCS#11 library of nCipher. Here's info from one of their engineers about the PKCS11 library:
    "There are two separate issues - one is that our current pkcs11
    release doesn't support ECDSA signature with SHA-2 hashes
    (the v11.00 firmware adds support for it, but the main release version of
    the pkcs11 library hasn't been updated to take advantage of it yet).
    There is a hotfix version that does support SHA-2 hashes with some
    restrictions, talk to [email protected] for details, and V11.10
    should be out soon and have that merged in.
    But the issue with setting CKA_SIGN is that our underlying HSM API
    allows elliptic curve keys to be either key exchange (ECDH) or
    signature (ECDSA) keys, but not both at one.
    At the PKCS #11 level, if you specify CKA_DERIVE=true and let
    CKA_SIGN default, it will default to false, and vice versa.
    If you specify both CKA_DERIVE=true and CKA_SIGN=true, then we
    return CKR_TEMPLATE_INCONSISTENT because we can't do both with
    the same key. (However, the tests using C_GetMechanismInfo will
    show that we can do both mechanisms, because we can - so long
    as you use different keys, even though they have the same PKCS#11
    type.)
    I can't comment on when or how that will be changed."
    I was using the PKCS#11 library through NSS when I ran into the problem, but I imagine Java would run into similar problems also using the PKCS#11 library. I was able to generate keypairs but not create a CSR (which required making a signature, which required SHA-2).
    Can you just use the java classes to speak to the netHSM? I've never directly written code to do so myself, but I have used Corestreet's OCSP product that uses the java classes to speak to the nCipher HSMs (though not using EC). It might work better than going through the PKCS#11 layer. There should be a java directory under NFAST_HOME that contains some jars.
    Please post back if you figure anything out as I'll probably be playing with this stuff myself soon.
    Dave

Maybe you are looking for

  • XML mapping to BusinessObjects

    Currently we need to rebuild a middleware layer in our company. The current implementation is a SOAP layer, implemented using SSB's, implemented in java with objects generated with Castor. These objects are mapped programmatic to specific Cobol-busin

  • How can I create this?

    I want the scrolling (selectable) pictures, fonts, and buttons. http://www.whitehouse.gov/

  • Preview in browser doesn't load linked page images

    The site works fine when uploaded, but when I preview a page (it's a work in progress site so constantly adding to it), it previews fine, but when I click the links to other pages, it loads the page with all the images in position but only as missing

  • Sales order, Delivery and Billing document creation

    Hello Experts, I am working on credit management and am in need of creating sales order, delivery and billing document. Can some one send me the screen shots or any doc which outlines order,delivery and billing document creation. Will award points de

  • 2008 1099 forms and file layout

    Has anyone heard anything from SAP on new file layout and forms for 2008 1099 reporting?   Note 1249174 states it is available 1st week in Dec.