yubikey | GPG is useful for authenticating yourself over SSH and / | Encryption library

 by   DataDog Shell Version: Current License: MIT

kandi X-RAY | yubikey Summary

kandi X-RAY | yubikey Summary

yubikey is a Shell library typically used in Security, Encryption applications. yubikey has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

GPG is useful for authenticating yourself over SSH and / or GPG-signing your git commits / tags. However, without hardware like the YubiKey, you would typically keep your GPG private subkeys in "plain view" on your machine, even if encrypted. That is, attackers who personally target [1, 2, 3, 4] you can compromise your machine can exfiltrate your (encrypted) private key, and your passphrase, in order to pretend to be you. Instead, this setup lets you store your private subkeys on your YubiKey. Actually, it gives you much stronger guarantees: you cannot authenticate over SSH and / or sign GPG commits / tags without: (1) your YubiKey plugged in and operational, (2) your YubiKey PIN, and (3) touching your YubiKey. So, even if there is malware trying to get you to sign, encrypt, or authenticate something, you would almost certainly notice, because your YubiKey will flash, asking for your attention. (There is the "time of check to time of use" issue, but that is out of our scope.).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              yubikey has a low active ecosystem.
              It has 435 star(s) with 20 fork(s). There are 268 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 6 open issues and 28 have been closed. On average issues are closed in 100 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of yubikey is current.

            kandi-Quality Quality

              yubikey has 0 bugs and 0 code smells.

            kandi-Security Security

              yubikey has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              yubikey code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              yubikey is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              yubikey releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of yubikey
            Get all kandi verified functions for this library.

            yubikey Key Features

            No Key Features are available at this moment for yubikey.

            yubikey Examples and Code Snippets

            No Code Snippets are available at this moment for yubikey.

            Community Discussions

            QUESTION

            How to SSH login to Google Cloud Shell using an existing private key on a YubiKey security key
            Asked 2022-Jan-26 at 10:47

            I can use gcloud cloud-shell ssh to login to Google Cloud Shell.

            This, on first use, creates a ~/.ssh/google_compute_engine (+.pub).

            But I already have existing SSH private key/s, and would much prefer to use those, specifically ed25519-sk and id_ecdsa_sk ones backed by a physical YubiKey security key. The gcloud cloud-shell ssh documentation mentions a --ssh-key-file flag, but it does not appear to work, and prints an ignored explicit argument error message that is not particularly helpful:

            ...

            ANSWER

            Answered 2022-Jan-26 at 10:47

            This behaviour seems to be a bug in the code of the SDK.

            On the file /lib/googlecloudsdk/command_lib/cloud_shell/util.py we can see how the --ssh-key-file argument is parsed:

            Source https://stackoverflow.com/questions/70608840

            QUESTION

            How to store AWS secret in yubikey?
            Asked 2022-Jan-25 at 12:47

            Im trying to store AWS access secret key in yubikey,but, as static password in "scan mode", it is not possible to store, because AWS secret exceeds 38 characters.

            Now im thinking of way to store AWS secret, as in "official" way they do with SSH --> https://gist.github.com/artizirk/d09ce3570021b0f65469cb450bee5e29 , but no luck for now ( and i have very few expectation for this "path" )

            Maybe someone have any suggestions?

            ...

            ANSWER

            Answered 2022-Jan-25 at 12:47

            It is impossible, we moved on to the AWS SSO

            Source https://stackoverflow.com/questions/70567303

            QUESTION

            Wrapped private key with libfido2?
            Asked 2022-Jan-23 at 18:00

            I am currently working my way into libfido2 and trying to figure out how to use wrapped private keys with it.

            Yubico says in the FAQs that with YubiKey 5 unlimited key pairs can be used for FIDO U2F; however, for FIDO2 only space for 25 resident keys is promised.

            1. Does "FIDO2" mean that resident keys are used and that FIDO2 cannot be used with (external) wrapped private keys?

            2. If this is the case, does libfido2 offer any possibility to work with FIDO U2F and wrapped keys instead?

            3. If so, how does libfido2 need to be configured to do this? How can I provide the library with the appropriate protected private key. At least in "fido2-assert" I don't see a way to do this when I want to create an assertion on the client.

            (The function accepts four specific parameters description here, and the only one that I understand could bring the private key is the "credential id". But the name makes me doubt if my request is possible with this parameter).

            I am grateful for any answer!

            EDIT: In the meantime I found this link to some Solo Keys developer pages describing how it works on Solo Keys. It seems the private key is calculated on the fly - in this case credential id would work as seed for the calculation)

            ...

            ANSWER

            Answered 2022-Jan-23 at 18:00

            FIDO2 encompasses both WebAuthn (browser API) and CTAP2 (USB/Bluetooth/NFC APIs for externally connected authenticators). CTAP2 supports both client-side and server-side credentials, and specifies how backwards compatibility with U2F/CTAP1 authenticators works. Since you're working with libfido2, the CTAP documentation might be useful to understand what it does under the hood.

            Client-side discoverable credentials (previously known as resident keys) are used for usernameless flows where no Credential IDs are specified during authentication. These keys are generated randomly and require storage space. Server-side credentials (non-resident keys) are represented as Credential IDs. What type of key is created is requested during the registration process but both FIDO2 standards default to server-side credentials if not specified. U2F only supported server-side credentials.

            For external authenticators with limited storage space, server-side credentials are typically wrapped private keys encrypted by a single 'master' key stored in the authenticator. Since the entire state is stored outside of the authenticator this allows for practically infinite keys to be generated even with limited storage space. But it does mean that the Credential ID generated during registration must be stored on the server, and in order to generate an assertion it must be offered back to the authenticator later for authentication. In WebAuthn these Credential ID(s) are typically presented after the user is identified (e.g. via username and password) in the allowCredentials argument, CTAP2 calls this allowList.

            With the terminology now (hopefully) clarified, yes libfido2 supports both types of credentials according to the assert example:

            Asks for a FIDO2 assertion corresponding to [cred_id], which may be omitted for resident keys. The obtained assertion is verified using .

            Source https://stackoverflow.com/questions/70823001

            QUESTION

            Connect Yubikey key to GitHub
            Asked 2022-Jan-19 at 15:48

            I recently purchased a YubiKey for two-factor authentication, but I don't know how to connect it to GitHub.

            Can anyone help me?

            ...

            ANSWER

            Answered 2022-Jan-19 at 15:48
            Step 1: Enable Two-factor authentification on your GitHub account
            1. Sign in to your GitHub account.
            2. Click your profile picture in the top right of the screen.
            3. Select Settings
            4. In the left panel, select Security
            5. Click Enable two-factor authentification
            6. Choose the method of you want to receive one-time passwords, Set up by using an app or Set up using SMS
            Step 2: Adding your Yubikey for two-factor authentification
            1. Sign in to your GitHub account.
            2. Click your profile picture in the top right of the screen.
            3. Select Settings
            4. In the left panel, select Security
            5. To the right of "Security keys", click Add.
            6. Insert your YubiKey into USB port.
            7. In the Security keys section, click Register new device.
            8. Type a nickname for your YubiKey, then click Add.
            9. Wait your YubiKey to begin flashing, then tap the gold button or edge.

            For more information: https://yubikey.com.ua/en/using-yubikey-with-github/

            Source https://stackoverflow.com/questions/70773560

            QUESTION

            WebauthN and Yubikey to generate keys for symmetric encryption in a browser. Is this hack secure?
            Asked 2021-Dec-02 at 16:42

            I understand that WebauthN is designed to perform authentication, but I'd like to use my Yubikey to create symmetric encryption keys to encrypt content on my web browser without relying on a backend server.

            Here's my approach:

            • During the assertion challange ( navigator.credentials.get({ publicKey }) ) the Yubikey signs a challenge string that the client sends to the authenticator.
            • I extract the signed challenge, hash it with SHA256 and use it as my new symmetric encryption key for AES256 encryption.
            • As long as the same challenge string is sent to the Yubikey, the encryption key will always be the same.

            In order to be able to decrypt the content on the web browser. I would have to be in possession of the Yubikey and the challenge string for 2 factor authentication.

            Is there anything wrong with this approach?

            ...

            ANSWER

            Answered 2021-Nov-27 at 09:51

            Why don't you use the Web Crypto API?

            This API is designed for cypher operations on client side and is suitable for your use case (client side encryption). It is supported by all recent browsers.

            Note that the main concern you may have is that this API does not supports hardware devices (smartcards, security tokens...).

            However, your Yubikey is certainly capable of generating a secured static password you can use as a master key you will derive to encrypt/decrypt your data.

            Source https://stackoverflow.com/questions/70131030

            QUESTION

            Unable to use AppId extension with WebAuthn for previously registered U2F keys
            Asked 2021-Nov-19 at 14:22

            With the eminent demise of the u2f api, I'm trying to move to WebAuthn APIs using the AppId extension to support security keys previously registered with U2F. As best I can tell from reading the docs I think I am doing it correctly, however, when attempting to authenticate I am prompted by my browser to tap my key, and my key is blinking, but upon tapping it I get the error "You're using a security key that's not registered with this website". In comparing the existing u2f authentication request I'm using the same appid and key handle.

            Example U2F sign request:

            ...

            ANSWER

            Answered 2021-Nov-16 at 17:53

            Everything about the options you pass to navigator.credentials.get() looks correct, including how you're specifying the "appid" extension. I believe the issue is that you're double-encoding your U2F credential's credential ID. Try passing the original "keyHandle" in the options instead (you can use it as-is because it's already compatible with base64url encoding):

            Source https://stackoverflow.com/questions/69993268

            QUESTION

            How to save path to executable that includes space and argument as variable?
            Asked 2021-Aug-31 at 16:14
            $ cat test.sh
            #! /bin/bash
            
            run="/Applications/YubiKey\ Manager.app/Contents/MacOS/ykman openpgp"
            
            $run info
            
            $ ./test.sh: line 5: /Applications/YubiKey\: No such file or directory
            
            ...

            ANSWER

            Answered 2021-Aug-31 at 16:14

            You need the quotes or the backslash, not both.

            Source https://stackoverflow.com/questions/69001647

            QUESTION

            Pkcs11 ECDSA signing returning CKR_DATA_INVALID
            Asked 2021-Aug-04 at 18:52

            I am using a piv on a Yubikey loaded with trusted certificates to do mutual tls with a server. I am using this golang pkcs11 library which is a wrapper over opensc-pkcs11.so

            I am implementing a signer interface using the yubikey so that it can be used as a private key with go's crypo/tls library.

            My signer function looks like this (I have added data in the error for debugging):

            ...

            ANSWER

            Answered 2021-Aug-04 at 18:52

            The key loaded into the slot was an RSA key, not an EC key meaning that doing ECDSA failed.

            Source https://stackoverflow.com/questions/68567889

            QUESTION

            How do I get my Yubikey to work with SSH in Windows 10?
            Asked 2021-May-23 at 07:03

            after buying a Yubikey 5 NFC for technical interest (firmware 5.2.7) and setting up FIDO2 authentication where possible, I ran into the problem that I could no longer connect to my GitLab server via SmartGit because the second factor is not requested and therefore I can't connect to the server.

            I then decided to deal with it on Windows 10 via Git Bash and SSH. Unfortunately, the documentation here assumes a lot of prior knowledge and I am an absolute beginner on the subject. In the meantime I managed to connect to the server with Git Bash and SSH using a locally generated SSH certificate.

            Now I would like to use the Yubikey instead of the certificate stored locally on the computer. Unfortunately, all instructions (e.g. this one https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key) lead to the same error message for me:

            ...

            ANSWER

            Answered 2021-May-23 at 07:03

            So: it is true Security keys are now supported for SSH Git operations , as announced early this month (May 2021) on GitHub, but, as discussed here, there are still issues.

            Your error message looks like a bug in progress on Debian: "issue 980393: /usr/bin/ssh-keygen -t ecdsa-sk fails with "Key enrollment failed: invalid format"".
            And it is still being reported this month.

            If this fails also with -t ecdsa, try and using a plugin for OpenSSH to connect to FIDO/U2F security keys through native Windows Hello APIs might help.
            Type export SSH_SK_HELPER=/usr/lib/ssh/ssh-sk-helper.exe first, as seen in tavrez/openssh-sk-winhello issue 1.
            Check your OpenSSH version is at least 8.2. It is on my side with the latest Git for Windows:

            Source https://stackoverflow.com/questions/67639931

            QUESTION

            openconnect with gp does not prompt for SAML authentication in command line
            Asked 2021-May-09 at 01:15

            I am using openconnect --protocol=gp vpn.mysite.com and it says its connecting, but it is waiting for the SAML authentication. The command and authentication works on my debian machine it prompts for a username and password, but trying on my other linux machine it does not seem to want to prompt for authentication. This is the output:

            ...

            ANSWER

            Answered 2021-May-09 at 01:15

            solved by adding --usergroup=gateway to the command

            so the total command that works is

            Source https://stackoverflow.com/questions/67450353

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install yubikey

            You can download it from GitHub.

            Support

            Go here for troubleshooting common issues such as unblocking a blocked card, error when pulling or pushing with git over SSH, and rebasing with git.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/DataDog/yubikey.git

          • CLI

            gh repo clone DataDog/yubikey

          • sshUrl

            git@github.com:DataDog/yubikey.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Encryption Libraries

            certbot

            by certbot

            Signal-Android

            by signalapp

            unlock-music

            by unlock-music

            client

            by keybase

            Signal-Server

            by signalapp

            Try Top Libraries by DataDog

            go-profiler-notes

            by DataDogJupyter Notebook

            glommio

            by DataDogRust

            datadog-agent

            by DataDogGo

            stratus-red-team

            by DataDogGo

            dd-agent

            by DataDogPython