test(app): the device's real cryptography meets the register's checks
The register's tests make the device's side from made-up bytes, and the app's from fakes; nothing held what the device's real cryptography (libsodium, on isolates) makes to what the register takes. Now register_interop_test.dart does: a new account's setup passes isPasswordSetup, the device's SRP answer checks with the register's srpVerify and its M2 with the device, bound to the instance and the purpose (another instance's or a change's identity refused), the keys open as made, a new password passes isNewPassword, and the phrase's proof for it checks against the phrase's own key, never the account's, with the device's framing of the message the register's. halkyon_base_server exports the checks it uses; halkyon_app takes it as a dev dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
f3c3f7fb51
commit
a253700f8b
2 changed files with 195 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ export 'src/password/key_proof.dart'
|
|||
PasswordProofPurpose,
|
||||
authenticatorDigest,
|
||||
canonicalInstanceUrl,
|
||||
isAccountSignature,
|
||||
keyProofMessage,
|
||||
newPasswordDigest,
|
||||
newPhraseDigest,
|
||||
|
|
@ -42,6 +43,8 @@ export 'src/password/password_config.dart';
|
|||
export 'src/password/passwords.dart'
|
||||
show
|
||||
gitHubSignInFreshFor,
|
||||
isNewPassword,
|
||||
isPasswordSetup,
|
||||
newPasswordCosts,
|
||||
passwordGroup,
|
||||
passwordMethod,
|
||||
|
|
@ -71,6 +74,7 @@ export 'src/register/people.dart' show issueSession;
|
|||
export 'src/register/sessions_ended.dart'
|
||||
show AccountSessionsEnded, deliverSessionNotices;
|
||||
export 'src/srp/srp_group.dart';
|
||||
export 'src/srp/srp_math.dart' show numberOf, padded;
|
||||
export 'src/srp/srp_server.dart'
|
||||
show
|
||||
SrpAccepted,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import 'package:clock/clock.dart';
|
|||
import 'package:cryptography/cryptography.dart';
|
||||
import 'package:halkyon_base_client/srp.dart' as srp;
|
||||
import 'package:halkyon_base_server/base.dart';
|
||||
import 'package:halkyon_base_server/src/srp/srp_math.dart';
|
||||
|
||||
/// The base URL devices address the tests' server by: its `apiServer`'s
|
||||
/// public scheme, host and port (config/test.yaml), which SRP's identity
|
||||
|
|
|
|||
Loading…
Reference in a new issue