Updated on 2026-08-14
This commit is contained in:
parent
2b2413cb14
commit
7de4b052fa
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import com.tangem.commands.ReadCommand
|
|||
import com.tangem.common.CompletionResult
|
||||
import com.tangem.common.apdu.CommandApdu
|
||||
import com.tangem.common.apdu.ResponseApdu
|
||||
import com.tangem.common.extensions.calculateSha256
|
||||
import com.tangem.crypto.EncryptionHelper
|
||||
import com.tangem.crypto.FastEncryptionHelper
|
||||
import com.tangem.crypto.StrongEncryptionHelper
|
||||
|
|
@ -207,7 +208,7 @@ class CardSession(
|
|||
when (result) {
|
||||
is CompletionResult.Success -> {
|
||||
val uid = result.data.uid
|
||||
val protocolKey = environment.pin1.pbkdf2Hash(uid, 50)
|
||||
val protocolKey = environment.pin1.calculateSha256().pbkdf2Hash(uid, 50)
|
||||
val secret = encryptionHelper.generateSecret(result.data.sessionKeyB)
|
||||
val sessionKey = (secret + protocolKey).calculateSha256()
|
||||
environment.encryptionKey = sessionKey
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue