Functional secret key handling across the app