Add integration of Javacard SDKs
This commit is contained in:
parent
61ca427119
commit
e3d20676f3
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "oracle_javacard_sdks"]
|
||||||
|
path = oracle_javacard_sdks
|
||||||
|
url = https://github.com/martinpaljak/oracle_javacard_sdks.git
|
15
README.md
Normal file
15
README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Crystal
|
||||||
|
|
||||||
|
Running Post-Quantum Cryptography (Kyber) on [JavaCard 2.2.1](https://www.cardlogix.com/product/cardlogix-credentsys-lite-java-card-72k/)
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
This requires JDK 11 and Apache Ant to be installed with their environment variables set and `bin` directories added to the environment's `PATH`.
|
||||||
|
|
||||||
|
Run this to setup the SDK environment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --init --recursive
|
||||||
|
souce env
|
||||||
|
ant setup
|
||||||
|
```
|
12
build.xml
12
build.xml
@ -4,13 +4,19 @@
|
|||||||
JavaCard Applet for the Kyber Post-Quantum-Cryptography Algorithm
|
JavaCard Applet for the Kyber Post-Quantum-Cryptography Algorithm
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<property name="JCSDK" value="C:\Program Files (x86)\Oracle\Java Card Development Kit 3.0.5u4" />
|
<property name="JCSDK" value="./oracle_javacard_sdks/jc305u4_kit" />
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<delete dir="build" />
|
<delete dir="build" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="setup">
|
<target name="check.sdk">
|
||||||
|
<condition property="jcsdk.exists">
|
||||||
|
<available file="${JCSDK}" type="dir" />
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="setup" depends="check.sdk" if="jcsdk.exists">
|
||||||
<mkdir dir="tools"/>
|
<mkdir dir="tools"/>
|
||||||
<get src="https://github.com/martinpaljak/ant-javacard/releases/download/v24.11.19/ant-javacard.jar" dest="tools" skipexisting="true"/>
|
<get src="https://github.com/martinpaljak/ant-javacard/releases/download/v24.11.19/ant-javacard.jar" dest="tools" skipexisting="true"/>
|
||||||
<get src="https://github.com/martinpaljak/GlobalPlatformPro/releases/download/v24.10.15/gp.jar" dest="tools" skipexisting="true"/>
|
<get src="https://github.com/martinpaljak/GlobalPlatformPro/releases/download/v24.10.15/gp.jar" dest="tools" skipexisting="true"/>
|
||||||
@ -20,7 +26,7 @@
|
|||||||
<!-- ant-javacard task from javacard.pro -->
|
<!-- ant-javacard task from javacard.pro -->
|
||||||
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="tools/ant-javacard.jar" />
|
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="tools/ant-javacard.jar" />
|
||||||
<javacard jckit="${JCSDK}">
|
<javacard jckit="${JCSDK}">
|
||||||
<cap output="build/cyber.cap" aid="A000000648" sources="src" targetsdk="java_card_kit-2_2_1">
|
<cap output="build/cyber.cap" aid="A000000648" sources="src" targetsdk="./oracle_javacard_sdks/jc221_kit">
|
||||||
<applet class="org.hacdc.cyber.Cyber" aid="A0000006482F0002" />
|
<applet class="org.hacdc.cyber.Cyber" aid="A0000006482F0002" />
|
||||||
</cap>
|
</cap>
|
||||||
</javacard>
|
</javacard>
|
||||||
|
2
env
Normal file
2
env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export JC_HOME="`pwd`/oracle_javacard_sdks/jc305u4_kit"
|
||||||
|
export JC_CLASSIC_HOME="`pwd`/oracle_javacard_sdks/jc221_kit"
|
1
oracle_javacard_sdks
Submodule
1
oracle_javacard_sdks
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit e2df471e04d86f33de69a947f44766fbef1d9d69
|
Loading…
x
Reference in New Issue
Block a user