아...그 뭐였더라..

  • 홈
  • 태그
  • 방명록

정보보호개론 3

RSA decryption

import java.math.BigInteger; public class RSAHW { public static void main(String[] args) { BigInteger n = new BigInteger("3174654383"); BigInteger e = new BigInteger("65537"); BigInteger C = new BigInteger("2487688703"); BigInteger p = n; BigInteger q = new BigInteger("2"); BigInteger pi; // (p-1)*(q-1) BigInteger k = new BigInteger("1"); BigInteger d, M; while(p.compareTo(q)==1) { //p>q if(p.mo..

Language/Java 2020.04.22

Java 기반의 AES 복호화 프로그램

import java.util.Base64; import javax.crypto.*; import javax.crypto.spec.*; public class Security_HW2 { static String key = "8iE3bf1se6N76HGPP8S0Xw=="; static String iv = "cHml3oX848/0uBwDJtChOA=="; static byte[] decKey = Base64.getDecoder().decode(key); //디코딩된 key static byte[] decIv = Base64.getDecoder().decode(iv); //디코딩된 iv public static String decode(String str) throws Exception { SecretKey..

Language/Java 2020.04.18

치환암호(substitution cipher) 복호화하기

#include #include void count(int len, char str[],int cnt[]); //알파벳 횟수 계산 void rank(int cnt[], int rnk[]); //rnk는 빈도수로 계산한 순위 void replace(char str[]); void print(int cnt[], int rnk[],char str[]); int main() { char str[1600] = "APS ZU BMS THAAMT KB SOP CHAAPJ MQ LPUWHKX. K UHJ SM JMZ SMLHJ VJ QXKPBLU -- UM PCPB SOMZDO TP QHEP SOP LKQQKEZASKPU MQ SMLHJ HBL SMVMXXMT, K USKAA OHCP H LXPHV. KS KU H L..

Language/C 2020.04.07
이전
1
다음
더보기
프로필사진

아...그 뭐였더라..

  • 전체 글 보기 (187)
    • Language (66)
      • C (1)
      • Python (8)
      • Java (8)
      • SQL (48)
      • JS (1)
    • Algorithm (94)
      • Problems (92)
      • algorithm (2)
    • Problem solving (13)
      • 쉽게 배우는 JSP 웹 프로그래밍 (13)
    • Project (10)
      • Intro (6)
      • Web (2)
      • Android (1)
      • Java (1)
    • 취업준비 (4)
      • 자격증 (0)
      • 경신스📰 (0)
      • Life Mission (4)
      • Study (0)

Tag

DP, 백준, 개발자취업, 자바, 완전탐색, 프로그래머스, 항해99, DFS, BFS, til, 99클럽, SQL, 코딩테스트준비, 파이썬, java, MySQL, 백트래킹, 그리디, Python, 쉽게 배우는 JSP 웹 프로그래밍,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바