What I built
Mobile e-voting for residents — RSA tally, ActiveMQ-driven PII purge and auth-server integration across the election lifecycle. Feign for auth/file MSA; Swagger for app-team collaboration.
Key work
- RSA-2048 tally keys
- public encrypt, PEM↔Java (BouncyCastle), pair match before decrypt
- Election state machine
- six sequential preflight checks; 30-min auto-start scheduler
- SecureRandom OTP
- 6 digits + SMS; pre-checks for vote eligibility
- ActiveMQ topic
- PII purge events to MSA; nightly retention deletes
- Feign
- auth/file services; turnout EnumMap (mobile / on-site / visit)
- Swagger API docs
- faster handoff with the app team
Code
// RSA 2048 키쌍 생성: 공개키 → DB, 개인키 → PEM 다운로드KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");kpg.initialize(2048, new SecureRandom());KeyPair kp = kpg.generateKeyPair();// 키쌍 유효성 검증: 개인키 암호화 → 공개키 복호화 → 일치 여부String enc = AsymmetricKeyUtil.encrypt("verification-sample", privateKey);return "verification-sample".equals(AsymmetricKeyUtil.decrypt(enc, publicKey));// 개표키 미설정 시 투표 시작 차단if (isBlank(event.getEncryptionKey()))throw new BusinessForbiddenException("개표키를 다운로드 받으세요.");