Menu

1 / 2

Software Signing

DEV Community·丁久·6 months ago
#9bUmCuNy
#software#sign#security#devops#signing
Reading 0:00
15s threshold

This article was originally published on AI Study Room . For the full version with working code examples and related articles, visit the original post.

Software Signing

Software Signing

Software Signing

Software Signing

Software Signing

Software Signing

Software Signing

Software Signing

Software Signing

Why Sign Software?

Software signing verifies the origin and integrity of code. It ensures that artifacts haven't been tampered with and come from a trusted source.

GPG Signing

Traditional signing with PGP/GPG:

Generate GPG key

gpg --full-generate-key

gpg --armor --export " [email protected] " > public.key

Sign artifacts

gpg --armor --detach-sign myapp.tar.gz

gpg --verify myapp.tar.gz.asc myapp.tar.gz

Sign git commits

git config commit.gpgsign true

git config user.signingkey KEY_ID

git commit -S -m "Signed commit"

Programmatic GPG verification

import gnupg

def verify_signature(artifact, signature_file):

gpg = gnupg.GPG()

with open(signature_file, "rb") as sf:

verified =…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.