Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
77ea368
Merge pull request #1 from cpathak/master
BKSSMVenkateswarlu Mar 24, 2020
33a4875
Initial commit of JavacardKeymaster with empty functions
Mar 24, 2020
f72a75c
Updated getHardwareInfo API
BKSSMVenkateswarlu Mar 26, 2020
5e28d93
Optimization changes
cpathak Mar 28, 2020
f99cbfb
Restructured keymaster from 4.0 to 4.1 implementation
Mar 28, 2020
875fc9f
Removed unwanted files
Mar 28, 2020
5d896ad
Corrected the year of Copyright
Mar 28, 2020
95c6269
Renamed 4.0 to 4.1 in service.cpp
Mar 28, 2020
e0c0239
Merge pull request #2 from cpathak/master
BKSSMVenkateswarlu Mar 28, 2020
544dfd1
Added CboreConvert class
BKSSMVenkateswarlu Mar 29, 2020
caf2c64
Removed unnecessary header file
BKSSMVenkateswarlu Mar 29, 2020
6a0551d
Corrected function names in CboreConverter source file
BKSSMVenkateswarlu Mar 29, 2020
96e08c5
Removed unnecessary header file
BKSSMVenkateswarlu Mar 29, 2020
a6c3672
Remodified CborConverter class methods
BKSSMVenkateswarlu Mar 30, 2020
437f9c7
Removed Operation class
BKSSMVenkateswarlu Apr 14, 2020
7cd2846
Removed Operation.cpp file from Android.bp
BKSSMVenkateswarlu Apr 14, 2020
66e4157
Removed dependency on deleted Operation class
BKSSMVenkateswarlu Apr 14, 2020
c8e5fca
Modified CborConverter class
BKSSMVenkateswarlu Apr 14, 2020
cccc6f4
Fixed initial phase of compilation errors after modifying CborConvert…
Apr 15, 2020
c85f8cc
Integrated getHmacParameters and computeHmacParameters
BKSSMVenkateswarlu Apr 15, 2020
fdf1701
Implemented getHamcSharingParameters, computeSharedHmac and
Apr 17, 2020
47d07c2
Completed conversion from hidl to cbor and cbor back to hidl types.
Apr 17, 2020
1a1ec7c
Modified the ordering HmacSharingParameters and KeyCharacaterstics
Apr 28, 2020
f0ab72e
Initial implementation of transport library
May 4, 2020
0b4e696
construct and decode Apdu functions added
May 5, 2020
d6fbd6e
Integration of Apdu message with getHardwareInfo function
BKSSMVenkateswarlu May 5, 2020
1dde467
Fixed compilation errors for getHardwareinfo
May 5, 2020
8a43205
Modified getItemAtPos method
May 8, 2020
f918360
Calling transport send method in all the APIs
May 8, 2020
5f96e48
some code refactoring
May 13, 2020
e50e516
openConnection moved to Constructor
May 13, 2020
53b9d1c
Remove unnecessary functions and add assert statement
May 13, 2020
bcb672b
Merge pull request #3 from bvenkateswarlu/keymaster_4_1_singleclass
BKSSMVenkateswarlu May 14, 2020
f0c7317
Added documentation for transport classes.
May 14, 2020
1211db1
Fix for ENUM_REP tags while encoding to CBOR
May 19, 2020
71032c0
Import PKCS8 key using software key master and then feed as RAW forma…
May 21, 2020
8c443f8
Identation for importKey function
May 21, 2020
5b28518
Added logic for uint and ulong repetitions
May 21, 2020
6f00169
Fixed issue with parsing KeyCharacteristics.
May 23, 2020
cdb92da
Optimized getBinaryArray method in CborConverter class.
May 25, 2020
3a2de16
converted error code to negative number before converting it to ErroC…
May 25, 2020
ad3f8e4
Fixed the crash issue in CborConverter class
May 26, 2020
56e1879
Error handling while import key is corrected and started changes for …
May 29, 2020
fc69e0d
Added setBootParams method.
Jun 5, 2020
85c5386
Merge branch 'keymaster_4_1_singleclass' of https://github.com/bvenka…
Jun 12, 2020
60351ae
Added Operation context class
Jun 12, 2020
471ce82
Merge branch 'keymaster_4_1_singleclass' of https://github.com/bvenka…
Jun 13, 2020
3bedbe4
Added java_card_soft_keymaster_context extending pure soft keymaster …
Jun 14, 2020
76d43ca
Added validations in OperationContext
Jun 14, 2020
5402afb
Integration of OperationContext with JavacardKeymaster4Device class
Jun 15, 2020
e9921a8
decode parse wrapped keyblob in importWrappedKey
Jun 15, 2020
ba78d68
1. validations for sign and encrypt for Digest::None case
Jun 17, 2020
abe6e27
Fixed the issues observed while running vts test case EncryptionOpera…
Jun 18, 2020
3290960
Merge pull request #8 from bvenkateswarlu/keymaster_4_1_singleclass
BKSSMVenkateswarlu Jun 18, 2020
af02106
Merge pull request #9 from bvenkateswarlu/keymaster_4_1_singleclass
BKSSMVenkateswarlu Jun 18, 2020
84f48bf
Code cleanup
Jun 20, 2020
a522bb2
Fixed issue in importwrappedKey method
Jun 21, 2020
d4228d7
Added public operation abort functionality and some fixes in cbor con…
Jun 21, 2020
88f417f
Merge branch 'keymaster_4_1_singleclass' of https://github.com/bvenka…
Jun 21, 2020
4e681d1
Created static instance of TransportFactory so that same will be used…
Jun 24, 2020
c872a8a
1. Fixed bugs in provision API. Root key extension changed to der.
Jun 25, 2020
a354827
Encode the parametersVerified value inside VerficationToken to asn1 f…
Jun 28, 2020
969fc83
Fixed issue of empty public key in EC key extract. Also returned erro…
Jun 30, 2020
eeb5d63
Fixed the issue while parsing the Keyparameters from cbor
Jun 30, 2020
918859d
Added Digest, Padding, Keysize in Param list in provision API
Jul 1, 2020
35fac60
1. Fix for TOO_MANY_OPERATIONS
Jul 1, 2020
d45c8ff
Merge pull request #16 from BKSSMVenkateswarlu/keymaster_4_1_singleclass
BKSSMVenkateswarlu Jul 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions Applet/Applet/src/com/android/javacard/keymaster/KMArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.android.javacard.keymaster;

import javacard.framework.ISO7816;
import javacard.framework.ISOException;

public class KMArray extends KMType {
private KMType[] vals;
Expand Down Expand Up @@ -67,15 +68,15 @@ public KMArray withLength(short length) {

public KMArray add(short index, KMType val) {
if (index >= length) {
throw new KMException(ISO7816.SW_WRONG_LENGTH);
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
vals[(short) (startOff + index)] = val;
return this;
}

public KMType get(short index) {
if (index >= length) {
throw new KMException(ISO7816.SW_WRONG_LENGTH);
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
return vals[(short) (startOff + index)];
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.android.javacard.keymaster;

import javacard.framework.ISO7816;
import javacard.framework.ISOException;

public class KMBoolTag extends KMTag {

Expand Down Expand Up @@ -81,7 +82,7 @@ public byte getVal() {
// create default assignBlob without any value
public static KMBoolTag instance(short key) {
if (!validateKey(key)) {
throw new KMException(ISO7816.SW_DATA_INVALID);
ISOException.throwIt(ISO7816.SW_DATA_INVALID);
}
KMBoolTag tag = repository.newBoolTag();
tag.key = key;
Expand Down
13 changes: 7 additions & 6 deletions Applet/Applet/src/com/android/javacard/keymaster/KMByteBlob.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.android.javacard.keymaster;

import javacard.framework.ISO7816;
import javacard.framework.ISOException;
import javacard.framework.Util;

// Byte val represents contiguous memory buffer.
Expand Down Expand Up @@ -48,7 +49,7 @@ public static KMByteBlob instance() {
// copy the blob
public static KMByteBlob instance(byte[] blob, short startOff, short length) {
if ((length <= 0) || ((short)(startOff+length) > blob.length)) {
throw new KMException(ISO7816.SW_WRONG_LENGTH);
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
KMByteBlob inst = instance(length);
Util.arrayCopyNonAtomic(blob, startOff, inst.val, inst.startOff, inst.length);
Expand All @@ -58,7 +59,7 @@ public static KMByteBlob instance(byte[] blob, short startOff, short length) {
// returns empty blob with given length
public static KMByteBlob instance(short length) {
if (length <= 0) {
throw new KMException(ISO7816.SW_WRONG_LENGTH);
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
KMByteBlob inst = instance();
inst.startOff = repository.newByteArray(length);
Expand All @@ -83,20 +84,20 @@ public KMByteBlob withLength(short len) {

public void add(short index, byte val) {
if (index >= this.length) {
throw new KMException(ISO7816.SW_WRONG_LENGTH);
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
if (this.val == null) {
throw new KMException(ISO7816.SW_DATA_INVALID);
ISOException.throwIt(ISO7816.SW_DATA_INVALID);
}
this.val[(short) (startOff + index)] = val;
}

public byte get(short index) {
if (index >= this.length) {
throw new KMException(ISO7816.SW_WRONG_LENGTH);
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
if (this.val == null) {
throw new KMException(ISO7816.SW_DATA_INVALID);
ISOException.throwIt(ISO7816.SW_DATA_INVALID);
}
return this.val[(short) (startOff + index)];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.android.javacard.keymaster;

import javacard.framework.ISO7816;
import javacard.framework.ISOException;

public class KMByteTag extends KMTag {

Expand Down Expand Up @@ -74,7 +75,7 @@ public static KMByteTag instance() {

public static KMByteTag instance(short key) {
if (!validateKey(key)) {
throw new KMException(ISO7816.SW_DATA_INVALID);
ISOException.throwIt(ISO7816.SW_DATA_INVALID);
}
KMByteTag tag = repository.newByteTag();
tag.key = key;
Expand All @@ -93,7 +94,7 @@ public static void create(KMByteTag[] byteTagRefTable) {
// create default assignBlob without any value
public static KMByteTag instance(short key, KMByteBlob array) {
if (!validateKey(key)) {
throw new KMException(ISO7816.SW_DATA_INVALID);
ISOException.throwIt(ISO7816.SW_DATA_INVALID);
}
KMByteTag tag = repository.newByteTag();
tag.key = key;
Expand Down
Loading