Security notes / Unsorted

From Helpful
Jump to: navigation, search
Security related stuff.

Practical


Theory / unsorted



how to do a login system badly
how to do encryption badly
encrypted connections
data-at-rest encryption
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, or tell me)


TPM

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, or tell me)

What?

What is it?

The TPM (Trusted Platform Module) is the hardware support of a larger design (Trusted Computing), and that hardware part allows certain secrecies that are otherwise hard to guarantee.


Physically, TPM is a separate hardware module that may be built into laptops (fairly common in business laptops), and for PC motherboards was originally a plug-in module though is now also seen integrated.


...except when it isn't.

These days, you also find TPM is integrated into CPUs (Intel calls it PTT, AMD calls it fTPM). This is functionally similar, but has some drawbacks.

Motherboard may allow using either a physical module or such integrated TPM.


What does it do?

The TPM is a different things to different people/needs.


It e.g. helps store some keys, creates derived keys without revealing the original, does certain cryptography.


It being separate hardware

makes it harder to steal certain keys
means there are some cases where you can use a key it stored without every transporting it out.
Keys for some uses can be marked as "never move these out"
Some other uses require them to be migratable, though.
lets you tie certain keys to specific TPM hardware
which alleviates certain physical attacks.
For example, you can force an encrypted drive to only work on the computer you encrypted it on (though note that also poses some risk of data loss)
you can prevent booting something that wasn't previously approved
as protection against malware that alters the boot
again, with footnotes.


In general, it makes attack surface much smaller and some attacks much harder to do remotely.

Though note it can be used badly, and even good use can be overestimated.



On secure boot

"Can't detect TPM device"

Means the BIOS knows that you can plug in a TPM module, and is looking for it (configured to do so, or always does), and doesn't find one.

So tell it not to look for one (if you can), plug one in, or ignore this message. It's often under a header named something like 'Trusted Computing'

Some BIOSes will always look for it(verify), in which case you can just ignore the message.

More acronyms

What does TPM not protect?

TPM versus TPM2

Use and criticism, strengths and weaknesses

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, or tell me)

See also

Nonce

Challenge/response

ZKP

JSON Web Signature, Encryption, Tokens

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, or tell me)

GSSAPI notes

GSSAPI is a IETF standard to make it easier for various software to do various strong auth, e.g. Kerberos.

It also allows various other auth schemes to be plugged into it.


Which also makes it potentially interesting for SSO setups within an organisation.


(not unlike SASL, which can include GSSAPI)


It's used by things like OpenSSH,

publickey
gssapi-keyex
gssapi-with-mic
password


NaCl

NaCl as in libsodium

Google NaCl