Coder Social home page Coder Social logo

vjcre's Introduction

1674679905811

Hi there ๐Ÿ‘‹

This is Martin from ๐Ÿ‡ช๐Ÿ‡ช Estonia ๐Ÿ‡ช๐Ÿ‡บ. Every now and then I push code to Github, that scratches my own itches (remembering Kerckhoff's principle!).

Most probably you're here because of the "open source javacard software development toolkit" that consists of

๐Ÿ›œ NFC/NDEF and ๐Ÿ”‘ FIDO/WebAuthn are topics where you can expect developments in 2024.

There are also historical bits and pieces related to generic smart cards (PC/SC, CCID) and crypto with Java/JavaScript/PKCS#11, and Estonian eID and identity (OpenID etc) in general.

When it comes to Estonian eID, most of what I worked on has been continued by others: @OpenSC (open source PKCS#11 and native platform crypto drivers for smart cards), @web-eid (modern WebExtensions based authentication and signing for desktop browsers) and @open-eid (ages ago I pushed Estonia to publish (most of) it's eID client software as open source)

Feel free to ๐Ÿ’ฌ book a call if you have any questions or ongoing projects in these domains or to ๐Ÿ™ sponsor my open source work!

News

[Google Open Source Peer Bonus for GlobalPlatformPro]

vjcre's People

Contributors

martinpaljak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vjcre's Issues

Unable to test the ouput of a select applet command

The tool is very good.
However it is difficult to test functions involving selectingApplet() returning true except doing test with a hardcoded value of "true". Hopefully, this is case only for the first function called.

Indeed, selectingApplet() returns false every time and I wasn't able to call the overwrite of the select function of the applet.
Seems to be a FIXME:

protected final boolean selectingApplet() {
return false; // FIXME
}

Maybe modify the "selectApplet" or "install" function to call the select function of the applet, set selectingApplet to return true and issue a SELECT APDU before setting selectingApplet to false

OwnerPIN check and update issue when using an offset

in /src/javacard/framework/OwnerPIN.java
(https://github.com/martinpaljak/vJCRE/blob/85c7828089fcde0fa8cde89a622b5ec582804947/src/javacard/framework/OwnerPIN.java)

The offset parameter of the functions check and update is not used.
My opinion is that:
Util.arrayCopy(pin, (short)0, value, (short)1, length);
should be changed to
Util.arrayCopy(pin, offset, value, (short)1, length);

and
if (Util.arrayCompare(pin, (short) 0, value, (short) 1, length) == 0) {
should be changed to
if (Util.arrayCompare(pin, offset, value, (short) 1, length) == 0) {

OwnerPIN.

Please check this again.
protected void setValidatedFlag(boolean value) {
validated = false; // ??? I think that It is "validated = value;"
}

sendBytesLong doesn't throw an exception if setOutgoingLength not called

According to http://www.win.tue.nl/pinpasjc/docs/apis/jc222/javacard/framework/APDU.html#sendBytesLong%28byte[],%20short,%20short%29

"throws:(...) APDUException.ILLEGAL_USE if setOutgoingLength() not called or setOutgoingAndSend() previously invoked or response byte count exceeded or if APDUException.NO_T0_GETRESPONSE or APDUException.NO_T0_REISSUE or APDUException.NO_T0_REISSUE previously thrown. "

Indeed no check is done on sendBytesLong for that

public void sendBytesLong(byte outData[], short bOff, short len) throws APDUException, SecurityException {

Took me a while to find the problem in my card when testing on the card while it was fine on the emulator ;-)

APDU.receiveBytes not working

Indeed in VRE.transmit, you do not get the size of the array sent (https://github.com/martinpaljak/vJCRE/blob/master/src/pro/javacard/vre/VRE.java#L207-L211)

So when APDU.receiveBytes is called:

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.