2017년 2월 11일 토요일

파이썬 설치 환경변수 / 텐서플로우



PATH에

pip-> 파이썬설치경로/Scripts로 지정해줘야.
python->파이썬설치경로로.

PYTHONPATH라는 새 변수에
파이썬설치경로\Lib 추가
- 환경변수 설정 후 재부팅

현재 윈도우에서 pip install tensorflow로 텐서플로우 지원함.
(pip : python install package)

설치 된 것 같아도 안됬을 수 있으니 확인하자

◆windows 설치 시 에러
https://www.tensorflow.org/get_started/os_setup#pip_installation_on_windows
(설치해야함)

NOTE: TensorFlow requires MSVCP140.DLL, which may not be installed on your system. If, when you import tensorflow as tf, you see an error about No module named "_pywrap_tensorflow" and/or DLL load failed, check whether MSVCP140.DLL is in your %PATH% and, if not, you should install the Visual C++ 2015 redistributable (x64 version).


파이썬 프린트문은 print()로 감싸야 함

2017년 2월 10일 금요일

ECDSA vs ECIES vs ECDH

  • ECDSA is a digital signature algorithm
  • ECIES is an Integrated Encryption scheme
  • ECDH is a key secure key exchange algorithm
First you should understand the purpose of these algorithms.
Digital signature algorithms are used to authenticate a digital content. A valid digital signature gives a recipient reason to believe that the message was created by a known sender, such that the sender cannot deny having sent the message (authentication and non-repudiation) and that the message was not altered in transit (integrity).
Integrated Encryption scheme is a hybrid encryption scheme which provides semantic security against chosen plain text and chosen cipher text attacks. ECIES uses different types of functions:
  • Key Agreement function
  • Key Derivation Function
  • Symmetric Encryption scheme
  • Hash function
Secure key exchange algorithms are used to exchange our keys securely via a non secure channel.
Here you are interested in Elliptic Curve variants of those algorithms. Your requirement is to exchange some data. So you can use ECDH to share the secret key and ECDSA to sign the content. Because ECDH does not provide authentication we can use ECDSA for that purpose. Once the secret key is shared, you can securely exchange your data through a non secure channel. Strength of the secret key can be defined by considering the level of security you need and amount of computation power you got.

http://crypto.stackexchange.com/questions/12823/ecdsa-vs-ecies-vs-ecdh

2017년 2월 6일 월요일

OAuth 2.0


Resource Owner: corporation, perhaps one with policy that enables / disables access to a resource.
Resource Server : API 서버
Client : 써드파티 Application

< Access Token >

서비스에 Password 전달 없이 인증

패스워드 변경시에도 유효

언제나 다시 권한 취소 가능

필요한 기능만 부여할 수 있음




Oauth 1.0에서는 한가지 인증방식만을 사용
but

Oauth 2.0 에서는 시나리오 별 여러가지 인증 방식.

(웹/모바일)



OAuth 2.0을 반영한 대부분의 API는 
허가된 요청을 만드는 데 전달 토큰만 있으면 된다.

전달 토큰은 간단한 토큰 값으로
보호되는 자원에 접근할 수 있게 해주는
액세스 토큰의 한 종류다.

사용자나 애플리케이션 대신
API 요청을 수행하기 위한
OAuth 액세스 토큰을
얻기 위해 사용

액세스 토큰을 얻은 후
그것을 요청에 실어 보낸다.
(HTTP 헤더에 포함 등등)

argmax

Points of the domain of some function at which the function values are maximized.[note 1]