K out of N encryption A friend just showed me how to combine padlocks to achieve a lock that opens when k out of n people turn their keys.

I was wondering if there was something similar for encryption; using n or fewer public keys encrypt a piece of data so it can only be unlocked if at least k out of n specific private keys are applied.

I've tried ideas of stacking normal public key encryption, but without luck. I'm sure somebody must have done research on the topic, but I have no idea what such a thing is called. Maybe it's even widely accessible through standard encryption libraries?
Yes, it's called secret sharing.