Comments (8)
What about extending the commandline -key option with opts:key:kcv and adding an optional kcv parameter to key class? I expect key validation to happen before invoking GPPro commands or API, normally.
from globalplatformpro.
yes, validation should be upon entry. An opts --kcv sounds good. It would be great to enforce use of this when the "production" switch (#36) is used.
from globalplatformpro.
Just to clarify: for a KCV you mean the same algorithm that is used for PUT KEY? KCV could mean anything and could be proprietary, unless referencing some known algorithm in a public specification (same for other key derivation methods, and there's plenty of proprietary stuff in smart card field) I'm thinking of re-writing the whole key argument handling but don't yet have a great idea how. Eventually it would be nice if the key could be provided with a kcv in one argument (like currently des: and aes: prefixes work). But also the relax hex parsing of the key options is something I'd like to keep (easy copy-paste from e-mails, documentation etc), so some heuristics need to be done. Will do that on my next spring on GP.
from globalplatformpro.
But please clarify the kcv algorithm or provide a reference implementation of some other link. Otherwise I assume PUT KEY semantics ?
from globalplatformpro.
yes, put key - there is an industry standard that basically says the KCV is the first 24 bits (in hex format) of zero string encrypted with a given key.
"- The KCV is the "Key Check Value" for the key, calculated by assuming the key/components are 3DES keys, and encrypting a string of binary zeroes. The KCV is the first six hex digits of the resulting ciphertext."
It is mainly used for DES/3DES but I've seen applications for AES keys as well. Here's one online calculator working for DES/3DES only: http://extranet.cryptomathic.com/keyshares/index
from globalplatformpro.
So my idea would be to drop the current -mac/-enc/-kek command line options (but still allow to specify different keys from the API, if they are not derived from a single derived card key) for a single -key and a -kcv.
from globalplatformpro.
Just to add - the kcv method currently works for 3des as well as aes
from globalplatformpro.
works, cool! I like this. Just one comment about toString(), I will file it as a new request.
from globalplatformpro.
Related Issues (20)
- Deletion not allowed. Some app still active? - is it possible to delete a package or an applet HOT 4
- zsh: command not found: gp HOT 1
- Fix latest release links on the project website https://javacard.pro/globalplatform/ HOT 3
- DAP signature key option
- Creation of SSD fails with 0x6A80 HOT 2
- Installing applet to newly created SSD fails with 0x6985 (Conditions of use not satisfied)
- IllegalArgumentException when using CLI HOT 5
- --set-pre-perso and -set-perso not working because of wrong P1 in storeDGI in Infineon card. HOT 3
- globalplatform PRO tool putkey command usage example with sCp03
- SCP02: extended length APDUs cause an IllegalArgumentException HOT 4
- Relationship between GlobalPlatform and GlobalPlatformPro
- Too long list of installed applets causes IllegalStateException: Length is out of the range (older gppro v0.3.4 works) HOT 5
- GP for Android HOT 1
- Make .exe build conditional with a profile
- [Thales MAV5.0-5.1 Java Card OS] Failed to Open Secure Channel, Card Cryptogram Invalid!
- Proper documentation
- JCOP4 - INSTALL [for install and make selectable] failed: 0xFFD1 HOT 3
- GlobalPlatformPro support Put Key AES SCP03 ?
- Question on GPP output HOT 1
- Error: Index 4 out of bounds for length 4 when using the debug flag HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from globalplatformpro.