From: Ken Goldman <email@example.com> To: Lakshmi <firstname.lastname@example.org>, Linux Integrity <email@example.com>, Mimi Zohar <firstname.lastname@example.org>, David Howells <email@example.com>, James Morris <firstname.lastname@example.org>, Linux Kernel <email@example.com> Cc: Balaji Balasubramanyan <firstname.lastname@example.org>, Prakhar Srivastava <email@example.com> Subject: Re: [PATCH 0/2] public key: IMA signer logging: Log public key of IMA Signature signer in IMA log Date: Fri, 17 May 2019 10:41:55 -0400 Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> On 5/16/2019 9:29 PM, Lakshmi wrote: > On 5/16/19 7:34 AM, Ken Goldman wrote: > >>> But outside the client machine this key id is not sufficient to >>> uniquely determine which key the signature corresponds to. >> >> Why is this not sufficient? >> >> In my implementation, I create a lookup table at the attestation >> service that maps the 4-byte IMA log key identifier to the signing >> public key. >> >> Are you concerned about collisions? Something else? > > Yes - the concern is collision. > > The "Subject Key Identifier" (SKI) for no two certificate can be the > same. But since we are using only the last 4 bytes of the SKI it can > collide. That's mainly the reason I want to log the entire public key. > Since a platform typically uses only a few signing keys, 4 bytes makes the chance of a collision quite small. The collision would have to be within the same log, not global. In that worst case, the verifier would have to try two keys. It's a slight performance penalty, but does anything break? A new template with a larger SKI, perhaps 8 bytes, might be safer. It doesn't expand the log size nearly as much as having a full public key. >> Are you suggesting that the client supply the verification public key >> and that the verifier trust it? Wouldn't that make the log self signed? >> >> How would the verifier determine that the key from the IMA log is >> valid / trusted / not revoked from the log itself? > > IMA log is backed by the TPM. So if the public key is added to the IMA > log the attestation service can validate the key information. > I am not sure if that answers your question. The TPM just ensures that the log has not been altered. It does nothing for signature verification, right? The verifier can check that the supplied signature matches the supplied public key. However, how could it verify that the public key is trusted to sign the code? Doesn't that have to be out of band? E.g., an attacker could create a log with their own signatures and public keys. The signature would verify, but it's the attacker's key. It's essentially a self-signed file. >> A minor question here. >> >> Are you proposing that the IMA log contain a single ima-sigkey entry >> per public key followed by ima-sig entries? >> >> Or are you proposing that ima-sig be replaced by ima-sigkey, and that >> each event would contain both the signature and the public key? >> >> If the latter, this could add 25M to a server's 100K log. Would that >> increase in size concern anyone? Could it be a concern on the other >> end, an IoT device with limited memory? > > Mimi had raised the same concern. I will update my implementation to > include the certification information in the IMA log only once per key - > when that key is added to the IMA or Platform keyring. If you include the public key only once, don't you have the same collision problem? Two log entries could (in theory) and the same SKI. How would the verifier know which public key to use. However, I think the fundamental question is whether the verifier can accept public keys supplied by the untrusted client. I believe that the verifier has to receive the public keys out of band, from a trusted source - not the client.
next prev parent reply index Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-14 17:14 Lakshmi 2019-05-14 17:29 ` Mimi Zohar 2019-05-15 18:17 ` Lakshmi 2019-05-16 22:45 ` Mimi Zohar 2019-05-16 14:34 ` Ken Goldman 2019-05-17 1:29 ` Lakshmi 2019-05-17 14:41 ` Ken Goldman [this message] 2019-05-20 23:15 ` Lakshmi 2019-05-22 18:57 ` Ken Goldman 2019-05-22 19:37 ` Lakshmi
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-Integrity Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-integrity/0 linux-integrity/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-integrity linux-integrity/ https://lore.kernel.org/linux-integrity \ firstname.lastname@example.org email@example.com public-inbox-index linux-integrity Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-integrity AGPL code for this site: git clone https://public-inbox.org/ public-inbox