Skip to content

Commit

Permalink
add key algorithm to select response
Browse files Browse the repository at this point in the history
since it's possible to choose algorithm when setting code
  • Loading branch information
klali committed Apr 27, 2015
1 parent 33a32e9 commit dfcee2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions applet/src/pkgYkneoOath/YkneoOath.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public void process(APDU apdu) {
rng.generateData(buf, offs, CHALLENGE_LENGTH);
authObj.calculate(buf, offs, CHALLENGE_LENGTH, tempBuf, _0);
offs += CHALLENGE_LENGTH;
buf[offs++] = KEY_TAG;
buf[offs++] = 1;
buf[offs++] = authObj.getType();
}
apdu.setOutgoingAndSend(_0, offs);
return;
Expand Down
3 changes: 3 additions & 0 deletions doc/Protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ authentication is required for all commands except validate and reset.
|Challenge tag | 0x74
|Challenge length | Len of challenge
|Challenge data | Challenge
|Algorithm tag | 0x7b
|Algorithm length | Len of algorithm (1)
|Algorithm | What algorithm to use
|=======================

== PUT INSTRUCTION
Expand Down

0 comments on commit dfcee2d

Please sign in to comment.