SlugSecurity / ucsc-ectf-2023

UCSC's design and implementation for MITRE's eCTF 2023
MIT License
0 stars 1 forks source link

Implement fob pairing functionality - [merged] #58

Closed eggroll-bot closed 1 year ago

eggroll-bot commented 1 year ago

Merges fob-pairing -> main

This merge request implements pairing between the pairing host tool, paired fob, and unpaired fob.

Closes #5.

eggroll-bot commented 1 year ago

requested review from @MelonShooter

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 2 commits

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 5 commits

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

marked this merge request as ready

eggroll-bot commented 1 year ago

@victorh12 @jzhan357, please review as well.

eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 18:32

Commented on fob/src/pairing/diffie_hellman.rs line 259

It's possible for this to take longer than 1 second and still return a key since recv_verified_ephemeral_public_key uses a timeout of 1000 seconds.

eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 18:32

Commented on fob/src/pairing/pairing_sequence.rs line 22

This should be UART1.

eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 18:32

Commented on fob/src/pairing/diffie_hellman.rs line 211

/// Performs the Diffie-Hellman key exchange as an unpaired key fob and sets the UART1 channel key.
eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 18:32

Commented on fob/src/pairing/diffie_hellman.rs line 252

/// Performs the Diffie-Hellman key exchange as a paired key fob and sets the UART1 channel key.
eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 18:32

Commented on fob/src/pairing/diffie_hellman.rs line 266

    // Send Diffie-Hellman message to unpaired key fob.
eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 18:34

Commented on fob/src/pairing/diffie_hellman.rs line 277

    // Receive ephemeral public key from unpaired key fob.
eggroll-bot commented 1 year ago

changed this line in version 20 of the diff

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

resolved all threads

eggroll-bot commented 1 year ago

resolved all threads

eggroll-bot commented 1 year ago

changed this line in version 21 of the diff

eggroll-bot commented 1 year ago

changed this line in version 21 of the diff

eggroll-bot commented 1 year ago

changed this line in version 21 of the diff

eggroll-bot commented 1 year ago

changed this line in version 21 of the diff

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

In GitLab by @victorh12 on Feb 27, 2023, 23:44

approved this merge request

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

added 13 commits

Compare with previous version

eggroll-bot commented 1 year ago

In GitLab by @jzhan357 on Feb 28, 2023, 01:46

Commented on fob/src/pairing/diffie_hellman.rs line 52

Use VerifyingKey instead of PublicKey.

eggroll-bot commented 1 year ago

In GitLab by @jzhan357 on Feb 28, 2023, 01:46

Commented on fob/src/pairing/diffie_hellman.rs line 70

Use VerifyingKey instead of PublicKey.

eggroll-bot commented 1 year ago

changed this line in version 24 of the diff

eggroll-bot commented 1 year ago

added 1 commit

Compare with previous version

eggroll-bot commented 1 year ago

resolved all threads

eggroll-bot commented 1 year ago

In GitLab by @MelonShooter on Feb 28, 2023, 02:37

Commented on fob/src/pairing/diffie_hellman.rs line 21

This function is 70 lines long. Take each comment you made and make them their own self-describing function

eggroll-bot commented 1 year ago

In GitLab by @MelonShooter on Feb 28, 2023, 02:37

Commented on fob/src/pairing/diffie_hellman.rs line 63

This sequence of verifying a signature of a key should probably be made as a member function of VerifiedPublicKey or whatever that struct is called. That way it can be used here for easier for both this and verifying the signature of the ephemeral public key

eggroll-bot commented 1 year ago

In GitLab by @MelonShooter on Feb 28, 2023, 02:37

Commented on fob/src/pairing/diffie_hellman.rs line 87

This general pattern of getting a public key from a VerifiedPublicKey or whatever it was called should be generalized and made a method within that struct.

eggroll-bot commented 1 year ago

In GitLab by @jzhan357 on Feb 28, 2023, 02:38

Commented on fob/src/pairing.rs line 3

Shouldn't this be named unpaired_process_msg to match the other function name?

eggroll-bot commented 1 year ago

In GitLab by @MelonShooter on Feb 28, 2023, 03:13

Commented on fob/src/pairing/diffie_hellman.rs line 203

This can probably be the same code you have in run_paired with the loop. Double check that this is functionally sound.