Skip to content

COCOS-145 : Support Other Private/Public Key Pair Algorithms #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 3, 2024
Merged

Conversation

WashingtonKK
Copy link
Contributor

@WashingtonKK WashingtonKK commented Jun 13, 2024

What type of PR is this?

This is a feature because it adds support for other Public/Private key pair types.

What does this do?

This adds the following private/public key pair types in addition to the already existing RSA:

  • ecdsa
  • ed25519

The PR allows generation of these keys, and modifies sdk to accept multiple key types to be used as digital signatures for agent.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No

Did you document any new/modified feature?

No

@WashingtonKK WashingtonKK self-assigned this Jun 13, 2024
@SammyOina
Copy link
Contributor

update agent/auth, test/computations test/manual/agent-auth

2 similar comments
@SammyOina
Copy link
Contributor

update agent/auth, test/computations test/manual/agent-auth

@SammyOina
Copy link
Contributor

update agent/auth, test/computations test/manual/agent-auth

@WashingtonKK WashingtonKK requested a review from SammyOina June 24, 2024 09:38
Copy link
Contributor

@SammyOina SammyOina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also signature verification fails for rsa keys generated by openssl

go run ./test/computations/main.go ./test/manual/data/iris.csv ./test/manual/algo/lin_reg.py ../rsa_public.key false
AGENT_GRPC_URL=localhost:35335 go run cmd/cli/main.go algo ./test/manual/algo/lin_reg.py ../rsa_private.key 
2024/06/24 15:13:25 Uploading algorithm binary: ./test/manual/algo/lin_reg.py
2024/06/24 15:13:25 Error uploading algorithm with error: rpc error: code = Unauthenticated desc = signature verification failed

@WashingtonKK WashingtonKK force-pushed the cocos-145 branch 2 times, most recently from 7e8aea3 to 8f9ed97 Compare July 3, 2024 14:35
Signed-off-by: WashingtonKK <[email protected]>

pass cert to agent

Signed-off-by: WashingtonKK <[email protected]>

fix ci

Signed-off-by: WashingtonKK <[email protected]>

standardize key types

Signed-off-by: WashingtonKK <[email protected]>

marshal public key

Signed-off-by: WashingtonKK <[email protected]>

use openssl format for keys

Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]>

update makefile

Signed-off-by: WashingtonKK <[email protected]>

update agent

Signed-off-by: WashingtonKK <[email protected]>

enhance parsing logic

Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]>

fix ci

Signed-off-by: WashingtonKK <[email protected]>

return key on successful signature verification

Signed-off-by: WashingtonKK <[email protected]>

fix cli

Signed-off-by: WashingtonKK <[email protected]>

fix ed25519 signing

Signed-off-by: WashingtonKK <[email protected]>

ci

Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]>
@WashingtonKK WashingtonKK requested a review from SammyOina July 3, 2024 16:19
Signed-off-by: WashingtonKK <[email protected]>
@WashingtonKK WashingtonKK requested a review from SammyOina July 3, 2024 18:42
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drasko drasko merged commit ff5bade into main Jul 3, 2024
1 check passed
@WashingtonKK WashingtonKK deleted the cocos-145 branch July 3, 2024 21:03
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.

Feature: Support other private/public key pairs types for signatures
3 participants