Skip to content

Commit 323656b

Browse files
committed
Add android and ios information
1 parent fbeda93 commit 323656b

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ This plugin helps you by generating the assymetric RSA key pair.
44

55
The keys are generated and persisted in android/ios keystore.
66

7+
## Assymetric Key details
8+
The details of keys generated and store in android/iOS keystore is as follows:
9+
* type -> RSA
10+
* signature algorithm -> SHA256withRSA
11+
* key size -> 2048 bit
12+
13+
### Android
14+
* The RSA key pair is stored android [Keystore](https://developer.android.com/training/articles/keystore.html)
15+
* AES encryption is used.
16+
* The AES secret is encrypted with RSA and stored in shared preference.
17+
* For Android 9 (API leverl 28) [StrongBox](https://developer.android.com/training/articles/keystore.html#HardwareSecurityModule) is enabled by default.
18+
* As keystore is available in Android 4.3 (API level 18) and hgher, hence this is minimum required Android.
19+
20+
### iOS
21+
* The RSA key pair is stored in iOS [Keychain](https://developer.apple.com/documentation/security/keychain_services)
22+
* This plugin will run on iOS 10.0 and higher
23+
724
## Using plugin
825
This plugin exposes the following methods:
926
* `getPublicKey`: returns the RSA public key
@@ -18,7 +35,6 @@ This key pair is persisted in key store, i.e it is generated once, and always re
1835

1936
```dart
2037
static Future<String> getPublicKey()
21-
2238
```
2339
#### usage:
2440

@@ -50,7 +66,7 @@ This function verifies the signature against the plain data, it returns `true` i
5066
static Future<bool> verify(String plainText, String signature)
5167
```
5268

53-
usage:
69+
#### usage:
5470
```dart
5571
final bool result = await Cipher.verify('somePassword', 'SIGNATURE-XX');
5672
```

0 commit comments

Comments
 (0)