共通鍵暗号と公開鍵暗号とは?

インターネット上でデータ伝送するには、データを暗号化して送信することが一般的
データを暗号化して受信した際にデータの復号を行う
暗号化や復号は暗号化アルゴリズムと鍵によって行われる

### 2種類の暗号化方式
暗号化方式には共通鍵暗号と公開鍵暗号がある
共通鍵暗号は、暗号化と復号に同じ鍵を使用する 。第三者に知られないようにする
アルゴリズムにはRC4, DES, 3DES, AESなどがある AESが主流で無線LANやWPA2でも採用されている
通信接続先ごとに共通鍵を生成する必要がある
公開鍵暗号は、公開鍵と秘密鍵を生成する RSAやEIGamalなどのアルゴリズムがある
ハイブリット方式もある

なるほど、cryptの知識も大分必要だな

Install the Truffle framework

We will use the Truffle framework to issue tokens. Truffle is Ethereum’s Smart Contract Development Framework, which has functions such as compiling, linking, deploying, and binary management.

[vagrant@localhost crypto]$ npm -v
1.3.6

First of all, we will install Truffle.

[vagrant@localhost crypto]$ npm install -g truffle
npm http GET https://registry.npmjs.org/truffle
npm http GET https://registry.npmjs.org/truffle
npm http GET https://registry.npmjs.org/truffle
npm ERR! Error: CERT_UNTRUSTED
npm ERR!     at SecurePair. (tls.js:1430:32)
npm ERR!     at SecurePair.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:1029:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:521:13)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:341:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:418:25)
npm ERR!     at doWrite (_stream_writable.js:226:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:216:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:183:11)
npm ERR!     at write (_stream_readable.js:602:24)
npm ERR! If you need help, you may report this log at:
npm ERR!     
npm ERR! or email it to:
npm ERR!     

npm ERR! System Linux 2.6.32-754.3.5.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "truffle"
npm ERR! cwd /home/vagrant/local/crypto
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/vagrant/local/crypto/npm-debug.log
npm ERR! not ok code 0

what!?

Issue ERC 20 token

ERC 20 token is a standard for issuing tokens with Ethereum, and by issuing a token conforming to ERC20, simplification of exchange between different tokens has been realized. In addition, we can manage tokens collectively by utilizing ERC 20 compatible wallet. ERC stands for Ethereum RFC and ERC 20 stands for the 20th specification. Representative ERC 20 tokens include 0x, Augur, OmiseGo and others.

Requirements for creating ERC 20 tokens are defined, and seems to be able to issue tokens by implementing the following six methods and two events.

fucntion totalSupply() constant returns(unit totalSupply);

function balanceOf(address _owner) constant returns (unit balance);

function transfer(address _to, unit _value) returns (bool success);

function transferFrom(address _from, addess _to, unit _value) returns (bool success);

function approve(address _spender, unit _value) returns(bool success);

function allowance(address _owner, address _spender) constant returns (unit remaining);

event Transfer(address indexed _from, address indexed _to, unit _value);

event Approval(address indexed _owner, address indexed _spender, unit _value);