Giter Club home page Giter Club logo

Comments (6)

popovec avatar popovec commented on June 23, 2024 1

This question/issue interested me only for one reason, the only pkcs#11 implementation that supports unwrap/wrap in opensc is in card-myeid.c. What card-sc-hsm.c supports is a proprietary call that is not available from the pkcs#11 interface.

This has nothing to do with the CreateObject operation. As a rule, the token stores the /private/ key in a special file. This file is not normally readable, but it allows to perform a /private/ operation. The description of the /private key/ of this file is the subject of pkcs#15 .. and here it depends on the token whether it supports pkcs#15 or has another interface that has a mapping of this description (from an object) to some pkcs#15 description within the framework of opensc.

from opensc.

Jakuje avatar Jakuje commented on June 23, 2024

This operation is called unwrapping and is supported by PKCS#11. The code in sc-hsm driver has several mentions of "unwrap" so I believe this should work. You should be able to make some rough tests with pkcs11-tool (see --unwrap option and examples at the end of the manual page.

from opensc.

popovec avatar popovec commented on June 23, 2024

I looked at the src/libopensc/card-sc-hsm.c code, wrap/unwrap is supported here using the sc_card_ctl() call. Calling this code is not possible in the normal way from pkcs11-tool, but a specific call that appears to be supported by sc-hsm-tool must be used. (man sc-hsm-tool).

from opensc.

msetina avatar msetina commented on June 23, 2024

@popovec does that also mean for CreateObject call over PKCS11 interface? Importing key programaticaly with a template was giving me trouble, so I abandoned it.

from opensc.

frankmorgner avatar frankmorgner commented on June 23, 2024

sc-hsm-tool itself also has options for wrapping/unwrapping keys

from opensc.

frankmorgner avatar frankmorgner commented on June 23, 2024

https://github.com/OpenSC/OpenSC/wiki/SmartCardHSM

from opensc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.