Skip to content

Conversation

@serek8
Copy link
Collaborator

@serek8 serek8 commented Nov 17, 2025

This PR closes #2948

Description

I took over this issue from @nmsa. Here is the original PR #3036

In the old mastg test, we look for:

  • classes Cipher, Mac, MessageDigest, Signature
  • interfaces Key, PrivateKey, PublicKey, SecretKey
  • functions getInstance, generateKey
  • exceptions KeyStoreException, CertificateException, NoSuchAlgorithmException
  • classes importing java.security.*, javax.crypto.*, android.security.*, android.security.keystore.*

Not sure if we need all that. In this PR, I plan to test only how a key is generated. Therefore, I want to focus on KeyGenParameterSpec.Builder and its KeyProperties during a key creation. Please see the static test I added.

Please correct me if I'm wrong and I still need to verify classes, exceptions and imports. For now I can only see value in verifying the purpose of the key during creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MASTG v1->v2 MASTG-TEST-0015: Testing the Purposes of Keys (android)

2 participants