GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — KMS: add asymmetric keys samples by daniel-sanche · Pull Request #1638 · GoogleCloudPlatform/python-docs-samples

Conversation

@daniel-sanche

@daniel-sanche daniel-sanche commented Aug 16, 2018

Copy link
Copy Markdown
Member

Added samples for the KMS Asymmetric Keys launch

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 16, 2018
@engelke engelke self-assigned this Aug 16, 2018
engelke
engelke reviewed Aug 16, 2018
View reviewed changes

@engelke engelke left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Minor point: hanging indents ending on lines 110 and 133 of asymmetric.py have closing paren on lines by themselves. Also, closing braces in lines 34 through 38 of asymmetric_test.py not completely consistent, though all are perfectly clear. Other hanging indents have them at the end of the last line.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daniel-sanche
added kms asymmetric samples
9e29b65
@daniel-sanche
daniel-sanche force-pushed the kms-asymmetric branch from b8b14ce to 9e29b65 Compare August 16, 2018 20:54
engelke
engelke approved these changes Aug 17, 2018
View reviewed changes

@engelke engelke left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daniel-sanche
daniel-sanche merged commit 4831bba into GoogleCloudPlatform:master Aug 17, 2018
bdhess
bdhess reviewed Aug 20, 2018
View reviewed changes
Comment thread kms/api-client/asymmetric.py
def signAsymmetric(message, client, key_path):
"""Create a signature for a message using a private key stored on Cloud KMS
"""
digest_bytes = hashlib.sha256(message.encode('ascii')).digest()

@bdhess bdhess Aug 17, 2018

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This actually varies based on the key algorithm. For EC P-384 keys, it needs to be SHA-384.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daniel-sanche daniel-sanche Aug 20, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Do you think leaving a comment explaining this above this line would be sufficient?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bdhess bdhess Aug 21, 2018

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yep!-- or something similar to what you did in the Golang lib, where the sample method was obviously limited to a particular key+digest combo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread kms/api-client/asymmetric_test.py
s2 = create_key_helper(t.rsaSignId, t.rsaSign, 'ASYMMETRIC_SIGN',
'RSA_SIGN_PSS_2048_SHA256', t)
s3 = create_key_helper(t.ecSignId, t.ecSign, 'ASYMMETRIC_SIGN',
'EC_SIGN_P224_SHA256', t)

@bdhess bdhess Aug 17, 2018

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P224 was dropped from the API

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
busunkim96 pushed a commit to googleapis/python-kms that referenced this pull request Jun 4, 2020
@daniel-sanche @busunkim96
added kms asymmetric samples [(#1638)](GoogleCloudPlatform/python-doc…
e0f68d2
…s-samples#1638)
@rsamborski rsamborski mentioned this pull request Nov 8, 2022
migrate code from googleapis/python-kms #8470
Merged
6 of 8 tasks
rsamborski pushed a commit that referenced this pull request Nov 8, 2022
@daniel-sanche @rsamborski
added kms asymmetric samples [(#1638)](#1638)
d96510c
rsamborski pushed a commit that referenced this pull request Nov 11, 2022
@daniel-sanche @rsamborski
added kms asymmetric samples [(#1638)](#1638)
2847e36
rsamborski pushed a commit that referenced this pull request Nov 14, 2022
@daniel-sanche @rsamborski
added kms asymmetric samples [(#1638)](#1638)
8aa3024
dandhlee pushed a commit that referenced this pull request Nov 14, 2022
@daniel-sanche @dandhlee
added kms asymmetric samples [(#1638)](#1638)
e6fa537
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Oct 21, 2023
@daniel-sanche @busunkim96
added kms asymmetric samples [(#1638)](GoogleCloudPlatform/python-doc…
bddfb6c
…s-samples#1638)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@bdhess bdhess bdhess left review comments
@engelke engelke engelke approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@engelke engelke

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@daniel-sanche @engelke @bdhess @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.