Check key length

Can't be merged, just a reminder to rebase this after the holidays