Implement keygen component.