Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5cc8d6c
Merge pull request #63 from subrahmanyaman/Javacard_KeyMint_100_master
mdwivedi Sep 20, 2021
8f4b081
Merge pull request #64 from subrahmanyaman/Javacard_KeyMint_100_master
mdwivedi Sep 20, 2021
5c2279b
Update README.md
mdwivedi Sep 23, 2021
2c01ada
Update README.md
mdwivedi Sep 23, 2021
69f95ae
Code restructing for JCardSimProvider
subrahmanyaman Sep 24, 2021
45487ab
Added JCOP Provider
subrahmanyaman Sep 24, 2021
c66c21d
Fixed compilation errors in RKP
subrahmanyaman Sep 24, 2021
a0f5089
1. Support for JcardSim provision
subrahmanyaman Sep 24, 2021
8b5287a
Operation pool cleanup
subrahmanyaman Sep 25, 2021
a80c23e
corrected the package
subrahmanyaman Sep 25, 2021
90c1f89
Fixed AES key size validation issue captured through CTS
subrahmanyaman Sep 27, 2021
0cec329
Merge pull request #65 from subrahmanyaman/Javacard_KeyMint_100_maste…
mdwivedi Oct 4, 2021
f7ddf38
CTS fixes
subrahmanyaman Oct 9, 2021
9e4d099
reset wrapkeybuffer at power reset
subrahmanyaman Oct 11, 2021
96d8a86
VTS fix, VendorPatchLevel value mismatch
AvinashHedage Oct 11, 2021
abb1ca4
Merge pull request #1 from AvinashHedage/Javacard_KeyMint_100_master_…
subrahmanyaman Oct 11, 2021
3cbae0a
Renamed the Buffer constants
subrahmanyaman Oct 14, 2021
d5b49e5
Merge pull request #66 from subrahmanyaman/Javacard_KeyMint_100_maste…
mdwivedi Oct 14, 2021
fc4e39e
Added patches for android_12_r15 branch
subrahmanyaman Dec 8, 2021
9bc640c
Merge pull request #75 from subrahmanyaman/Javacard_KeyMint_100_maste…
mdwivedi Dec 8, 2021
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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
/*
* Copyright(C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" (short)0IS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.javacard.seprovider;

import org.globalplatform.upgrade.Element;

import javacard.security.AESKey;

public class KMAESKey implements KMMasterKey {

private AESKey aesKey;

public KMAESKey(AESKey key) {
aesKey = key;
}

public void setKey(byte[] keyData, short kOff) {
aesKey.setKey(keyData, kOff);
}

public byte getKey(byte[] keyData, short kOff) {
return aesKey.getKey(keyData, kOff);
}

public short getKeySizeBits() {
return aesKey.getSize();
}

public static void onSave(Element element, KMAESKey kmKey) {
element.write(kmKey.aesKey);
}

public static KMAESKey onRestore(Element element) {
AESKey aesKey = (AESKey) element.readObject();
KMAESKey kmKey = new KMAESKey(aesKey);
return kmKey;
}

public static short getBackupPrimitiveByteCount() {
return (short) 0;
}

public static short getBackupObjectCount() {
return (short) 1;
}

}
Loading