Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f8ca3ab
Merge pull request #30 from BKSSMVenkateswarlu/master
BKSSMVenkateswarlu Sep 4, 2020
6c2d85b
Merge pull request #31 from cpathak/master
BKSSMVenkateswarlu Sep 9, 2020
fd2b2cb
Merge pull request #34 from cpathak/master
BKSSMVenkateswarlu Sep 23, 2020
cdd4ae7
Merge branch 'master' into jcop_support
Oct 2, 2020
e4484e9
JCOP Provider Implementation
Oct 5, 2020
b4a3d65
In update operation, the inputConsumed len is equal to input length
Oct 6, 2020
76c5c97
Added code for ECDSA No Digest
Oct 15, 2020
3e1b42d
Added no digest ecdsa file
Oct 19, 2020
021ddd0
Removed commented code and indentation
Oct 20, 2020
9c1771c
1. Removed native code for random number generation and used RandomData
Oct 21, 2020
9350e5e
Merge pull request #12 from BKSSMVenkateswarlu/master
Oct 22, 2020
a4ace6f
Support for RSA-OAEP encoding scheme
Oct 27, 2020
9f6252d
1. Renamed JCOP Provider to SGTMProvider
Nov 2, 2020
230c433
Renamed SGTMProvider to AndroidSEProvider
Nov 3, 2020
7125820
provisioning changes
Nov 8, 2020
153562b
Divided single provision command into sub functions
Nov 9, 2020
f50dece
Fixed issues while provisioning
Nov 9, 2020
8bfd984
1. Provision certificate chain with out using extra RAM.
Nov 12, 2020
0a3e7d5
Provision functionality split into 6 separate functions
Nov 16, 2020
64a13b9
Active state should not allow provision commands
Nov 18, 2020
6204fcd
Incorporated first level review comments in KMKeymasterApplet class
Nov 19, 2020
56885ee
Changed the instruction command values for provision cmds
Nov 19, 2020
411e7b9
Add Begin/End STATE, rm old B&R & mv handle statem
Nov 20, 2020
93211c5
Merge branch 'android_se_provider' into state_cleanups
BKSSMVenkateswarlu Nov 20, 2020
6303fb9
Merge pull request #37 from mdwivedi/state_cleanups
BKSSMVenkateswarlu Nov 20, 2020
91012bf
1. AES CCM to AES GCM while deriving the key.
Nov 20, 2020
7c1fc4b
Modified Applet state machine
Nov 22, 2020
0259bef
1. Rearranged the Instruction set.
Nov 23, 2020
eff52b7
1. Modified certChain command.
Nov 24, 2020
7421351
Update KMKeymasterApplet.java
mdwivedi Nov 24, 2020
cbed872
Removed BackupRestoreApplet
Nov 24, 2020
140a3a4
Removed OracleSimProvider
Nov 24, 2020
8d36fec
Removed unused function getNumberOfCerts from SEProvider
Nov 24, 2020
60d22ce
Merge pull request #39 from mdwivedi/patch-1
BKSSMVenkateswarlu Nov 24, 2020
ce57214
Moved all time related functions under Provider implementation with c…
Nov 25, 2020
39707e2
Removed Backuprestore classes from AndroidSEProvider
Nov 25, 2020
fdf660d
1. add sendError OK inside addRngEntropy which is missing
Nov 25, 2020
b3d0f18
Support for Amendment H
Nov 26, 2020
f0a812d
made provision to send long bytes in getCertificateChain
Nov 26, 2020
61db464
Removed KMKeymasterStore.java file
Nov 26, 2020
34c5c2c
Added vendorPatchLevel and BootPatchLevel to SetBootParams
Nov 26, 2020
23abfa7
Added reclaimable memory and getAvailable memroy functions in Reposit…
Nov 28, 2020
0fe6b2f
Modified KMFunctionalTest code as per latest provision changes.
Nov 28, 2020
6bd8527
1. Corrected the spelling in the function documentation.
Nov 28, 2020
6662144
Resructured code and related changes
cpathak Nov 28, 2020
01cf309
Merge pull request #40 from cpathak/RestructuredCode
BKSSMVenkateswarlu Nov 29, 2020
028e182
Added new function isUpgrading inside KMSEProvider
Nov 29, 2020
6b62566
Update README.md
BKSSMVenkateswarlu Nov 30, 2020
1a06199
Update README.md
BKSSMVenkateswarlu Nov 30, 2020
0b26602
Added a protected function validateApduHeader so that subclass of KMK…
Nov 30, 2020
438583a
1. Moved provision and setbootparams in a separate file.
Dec 1, 2020
bc37a2a
Merge branch 'provision_split' into android_se_provider
Dec 1, 2020
905692a
Merge pull request #13 from BKSSMVenkateswarlu/android_se_provider
Dec 1, 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-out EXP JCA CAP
-exportpath api_export_files_3.1.0
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.android.javacard.keymaster.KMKeymasterApplet
-exportpath ../../AndroidSEProvider/api_export_files_3.0.5
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.android.javacard.keymaster.KMAndroidSEApplet
com.android.javacard.keymaster
0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
5 changes: 5 additions & 0 deletions Applet/AndroidSEProvider/AndroidSE_3_1_0.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-out EXP JCA CAP
-exportpath ../../AndroidSEProvider/api_export_files_3.1.0
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.android.javacard.keymaster.KMAndroidSEApplet
com.android.javacard.keymaster
0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
// converted by version 1.3
// on Wed Feb 14 10:43:54 CET 2018

.package org/globalplatform/upgrade {
.aid 0xA0:0x0:0x0:0x1:0x51:0x7;
.version 1.1;

.imports {
0xA0:0x0:0x0:0x0:0x62:0x0:0x1 1.0; //java/lang
}

.constantPool {
// 0
staticMethodRef 0.0.0()V; // java/lang/Object.<init>()V
}

.interface public abstract Element 0 {

.fields {
public static final byte TYPE_SIMPLE = 1; // B
public static final byte TYPE_MAPPED = 2; // B
public static final short SIZE_BOOLEAN = 1; // S
public static final short SIZE_BYTE = 1; // S
public static final short SIZE_SHORT = 2; // S
}

.method public abstract write(Z)Lorg/globalplatform/upgrade/Element; 0 {
}

.method public abstract write(B)Lorg/globalplatform/upgrade/Element; 1 {
}

.method public abstract write(S)Lorg/globalplatform/upgrade/Element; 2 {
}

.method public abstract write(Ljava/lang/Object;)Lorg/globalplatform/upgrade/Element; 3 {
.descriptor Ljava/lang/Object; 0.0;

}

.method public abstract canWriteBoolean()S 4 {
}

.method public abstract canWriteByte()S 5 {
}

.method public abstract canWriteShort()S 6 {
}

.method public abstract canWriteObject()S 7 {
}

.method public abstract initRead()V 8 {
}

.method public abstract readBoolean()Z 9 {
}

.method public abstract readByte()B 10 {
}

.method public abstract readShort()S 11 {
}

.method public abstract readObject()Ljava/lang/Object; 12 {
.descriptor Ljava/lang/Object; 0.0;

}

.method public abstract canReadBoolean()S 13 {
}

.method public abstract canReadByte()S 14 {
}

.method public abstract canReadShort()S 15 {
}

.method public abstract canReadObject()S 16 {
}

}

.interface public abstract MappedElement 1 {

.superInterfaces {
Element;
}

.method public abstract write(Z)Lorg/globalplatform/upgrade/Element; 0 {
}

.method public abstract write(B)Lorg/globalplatform/upgrade/Element; 1 {
}

.method public abstract write(S)Lorg/globalplatform/upgrade/Element; 2 {
}

.method public abstract write(Ljava/lang/Object;)Lorg/globalplatform/upgrade/Element; 3 {
.descriptor Ljava/lang/Object; 0.0;

}

.method public abstract canWriteBoolean()S 4 {
}

.method public abstract canWriteByte()S 5 {
}

.method public abstract canWriteShort()S 6 {
}

.method public abstract canWriteObject()S 7 {
}

.method public abstract initRead()V 8 {
}

.method public abstract readBoolean()Z 9 {
}

.method public abstract readByte()B 10 {
}

.method public abstract readShort()S 11 {
}

.method public abstract readObject()Ljava/lang/Object; 12 {
.descriptor Ljava/lang/Object; 0.0;

}

.method public abstract canReadBoolean()S 13 {
}

.method public abstract canReadByte()S 14 {
}

.method public abstract canReadShort()S 15 {
}

.method public abstract canReadObject()S 16 {
}

.method public abstract getMappedObject()Ljava/lang/Object; 17 {
.descriptor Ljava/lang/Object; 0.0;

}

.method public abstract setMappedObject(Ljava/lang/Object;)Lorg/globalplatform/upgrade/Element; 18 {
.descriptor Ljava/lang/Object; 0.0;

}

}

.interface public abstract OnUpgradeListener 2 {

.method public abstract onSave()Lorg/globalplatform/upgrade/Element; 0 {
}

.method public abstract onCleanup()V 1 {
}

.method public abstract onRestore(Lorg/globalplatform/upgrade/Element;)V 2 {
}

.method public abstract onConsolidate()V 3 {
}

}

.class public final UpgradeManager 3 extends 0.0 { // extends java/lang/Object

.publicMethodTable 1 {
equals(Ljava/lang/Object;)Z;
}

.packageMethodTable 0 {
}

.method private <init>()V {
.stack 1;
.locals 0;

L0: aload_0;
invokespecial 0; // java/lang/Object.<init>()V
return;
}

.method public static isUpgrading()Z 0 {
.stack 1;
.locals 0;

L0: sconst_0;
sreturn;
}

.method public static getPreviousPackageVersion()S 1 {
.stack 1;
.locals 0;

L0: sconst_0;
sreturn;
}

.method public static checkPreviousPackageAID([BSB)Z 2 {
.stack 1;
.locals 0;

L0: sconst_0;
sreturn;
}

.method public static createElement(BSS)Lorg/globalplatform/upgrade/Element; 3 {
.stack 1;
.locals 0;

L0: aconst_null;
areturn;
}

.method public static matchMappedElement(Ljava/lang/Object;)Lorg/globalplatform/upgrade/MappedElement; 4 {
.stack 1;
.locals 0;

.descriptor Ljava/lang/Object; 0.0;

L0: aconst_null;
areturn;
}

.method public static nonNullReference()Ljava/lang/Object; 5 {
.stack 1;
.locals 0;

.descriptor Ljava/lang/Object; 0.0;

L0: aconst_null;
areturn;
}

}

}
77 changes: 77 additions & 0 deletions Applet/AndroidSEProvider/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<project name="AndroidSEProvider" default = "default">
<import file="../build.xml" as="common" />
<!-- Properties - other properties are included from build_common.xml -->
<target name = "androidse.init" >
<property environment="env"/>
<property name="common.src.dir" value="${applet.common.src}"/>
<property name="androidse.src.dir" value="${AndroidSE.dir}/src"/>
<property name="androidse.home" value="${env.JC_HOME_SIMULATOR}"/>
<property name="build.sysclasspath" value="ignore" />
<!-- Taskdefs -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath> <pathelement location="${androidse.home}/lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<taskdef name="convert"
classname="com.sun.javacard.ant.tasks.ConverterTask"
classpath="${androidse.home}/lib/jctasks.jar" />
<taskdef name="verifycap"
classname="com.sun.javacard.ant.tasks.VerifyCapTask"
classpath="${androidse.home}/lib/jctasks.jar" />
<path id="androidse.jars"
description="Sets the classpath to Java Card API">
<pathelement path="${AndroidSE.dir}/lib/gpapi-upgrade.jar"/>
<pathelement path="${androidse.home}/lib/api_classic.jar"/>
<pathelement path="${androidse.home}/lib/api_classic_annotations.jar"/>
</path>
<path id="androidse.tools.jars"
description="Sets the classpath to Java Card API and tools">
<pathelement path="${AndroidSE.dir}/lib/gpapi-upgrade.jar"/>
<pathelement path="${androidse.home}/lib/api_classic.jar" />
<pathelement path="${androidse.home}/lib/tools.jar" />
<pathelement path="${androidse.home}/lib/api_classic_annotations.jar" />
</path>
<mkdir dir="${applet.build.dir}/classes"/>
</target>

<target name="androidse.compile" depends="androidse.init">
<pathconvert property="classpath" refid="androidse.jars"/>
<javac
destdir="${applet.build.dir}/classes"
source="7"
target="7"
debug="yes"
includeantruntime="no"
bootclasspath="${classpath}">
<src path="${common.src.dir}"/>
<src path="${androidse.src.dir}"/>
</javac>
</target>

<target name="androidse.convert" depends="androidse.compile">
<convert dir="${applet.build.dir}/classes" Configfile="${AndroidSE.dir}/AndroidSE_3_0_5.opt">
<classpath refid="androidse.tools.jars"/>
</convert>

<copy todir="${applet.build.dir}" flatten="true">
<fileset dir="${applet.build.dir}/classes">
<include name="**/*.cap"/>
<include name="**/*.jca"/>
<include name="**/*.exp"/>
</fileset>
<regexpmapper from="(.*)\.(.*)"
to="AndroidSE.\2"
casesensitive="yes"/>
</copy>
</target>

<target name="androidse.verify" depends="androidse.convert">
<verifycap capfile="${applet.build.dir}/AndroidSE.cap" outfile="${applet.build.dir}/digest.txt">
<exportfiles dir="${AndroidSE.dir}/api_export_files_3.0.5" includes="**/*.exp"/>
<classpath refid="androidse.tools.jars"/>
</verifycap>
</target>

<target name="default" depends="androidse.verify" />

</project>
Binary file added Applet/AndroidSEProvider/lib/gpapi-upgrade.jar
Binary file not shown.
Loading