refactors public key logic to be more intuitive

better implementation of `CryptoToken` logic