네트워크
-
[CS Study] JWT - 어떻게 사용해야하는가?네트워크/CS Study 2024. 3. 6. 12:22
1. JWT란 무엇인가? 2. 왜 JWT를 사용해야하는가? 3. JWT는 안전한가? 4. 토큰 탈취는 어떻게 이루어지는가? 5. 나는 어떤 방법으로 보안을 강화해야할까? ✅ JWT(JSON Web Token)란 무엇인가? 웹에서 사용되는 JSON 형식의 토큰에 대한 표준 규격으로 사용자의 인증, 인가 정보를 서버와 클라이언트 간에 안전하게 주고 받기 위해 사용되는 토큰이다. header, payload, signature로 구성되어 있으며 Base64-URL 문자열 형태로 "."을 통해서 구분되어 있다. 📦 header 일반적으로 토큰 유형과 서명 알고리즘으로 구성되어 있으며 JWT의 첫 번째 부분을 구성한다. { "alg": "HS256", "typ": "JWT" } 📦 payload 세가지 유형의 클..
-
[혼공컴운] CPU의 작동 원리네트워크/CS Study 2024. 3. 2. 13:49
✅ ALU와 제어장치 📦 ALU 1+2라는 연산을 수행하기 위해서는 피연산자(1, 2)와 수행할 연산(+)이 필요하기에 ALU는 레지스터를 통해 피연산자를 받고 제어장치로부터 제어 신호를 받아 산술, 연산, 논리 연산 등을 수행하는 장치이다. 결과값은 특정 숫자, 문자, 메모리 주소가 될 수 있다. 이 결과값은 메모리에 저장되지 않고 레지스터에 저장된다.(CPU는 메모리에 접근하는 시간이 레지스터보다 느리기에 추가적으로 다른 레지스터에 사용하거나 메모리에 담는 것인 이후에 실행) 부가적인 정보인 플래그를 추가적으로 내보낸다. 다양한 계산을 위한 회로를 가지고 있다.(덧셈: 가산기, 뺄셈: 보수기, 비트의 이동: 시프터, 오버플로우 검출기) 📌 플래그 더보기 위 보기와 같이 CPU에 숫자가 이진법으로 저장..
-
[혼공컴운] 메모리와 캐시 메모리네트워크/CS Study 2024. 3. 2. 12:57
✅ RAM의 특징과 종류 📦 RAM의 특징 실행할 프로그램의 명령어와 데이터가 저장되는 메모리로 전원을 끄면 저장된 명령어와 데이터가 날아가는 휘발성 저장 장치로 CPU는 보조기억장치에 직접 접근을 하지 못하기에 실행하고 싶은 프로그램이 보조기억장치에 있다면 RAM으로 복사하여 저장한 뒤 실행한다 즉 실행할 대상이 저장되는 공간이다. 📌 비휘발성 저장 장치 더보기 하드 디스크, SSD, CD-ROM, USB 메모리와 같은 보조 기억장치로 전원이 꺼져도 저장된 내용이 유지된다. 📦 RAM의 용량과 성능 RAM의 용량이 작다면 보조기억장치에서 실행할 프로그램을 가져오는 일이 잦아 실행 시간이 길어지기에 RAM의 용량이 크면 많은 프로그램들을 동시에 빠르게 실행하는데 유리하다. RAM의 용량에 비례해서 실행 ..
-
[CS Study] 브라우저 랜더링 과정네트워크/CS Study 2024. 2. 14. 22:39
개요 1. WHY? 2. 브라우저 랜더링 과정 3. Reflow / Repaint 4. CRP ✅ why? 📦 내가 느끼는 브라우저 랜더링이 중요한 이유 대부분의 프로그래밍 언어는 운영체제 또는 가상머신에서 실행되지만 자바스크립트의 경우 클라이언트에서 실행되기에 랜더링 과정을 통해서 어떻게 실행되는지 파악해야한다.(Node.js에서 실행시에는 다름) 브라우저에서 HTML, CSS, JS는 함께 실행된다. 화면이 그려지는 원리에 대해 파악함으로써 어느 부분에서 문제가 일어났는지 예측할 수 있고 이를 토대로 효율적이고 의도에 맞게 코드를 작성할 수 있다. 사용자 경험을 향상시키기 위한 성능 최적화 시에 어떤 부분을 얼마만큼 최적화 시켰는지 최적화 시킬 수 있는 요소는 어떤 것이 있는지 알 수 있다. 클라이언..