Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cipher.Mobile

Smith
October 12, 2016

 Cipher.Mobile

Introduction of mobile contents encryption.
- Motivations for encryption
- Cipher algorithm selection perspective
- Introduction of Feistel Design

Smith

October 12, 2016
Tweet

More Decks by Smith

Other Decks in Programming

Transcript

  1. namespace Drecom { Employee Introduce() { Employee employee = new

    Employee<Hirashain>(); employee.name = “Smith”; employee.division = Division.ClientArchitect; employee.group = Group.GameArchitect; employee.role = Role.Engineer.Client; employee.hireDate = Date.Parse(”2011-10-01”); return employee; } } Introduce.cs
  2. namespace Drecom { Employee Introduce() { Employee employee = new

    Employee<Hirashain>(); employee.name = “Smith”; employee.division = Division.ClientArchitect; employee.group = Group.GameArchitect; employee.role = Role.Engineer.Client; employee.hireDate = Date.Parse(”2011-10-01”); return employee; } } Introduce.cs
  3. Agenda 1. WHAT is cipher ? 2. WHY cipher ? 3. Cipher for

    WHERE ? 4. WHICH cipher ? 5. WHO choose cipher ? 6. (HOW to implement cipher ?)
  4. WHAT is cipher ? 1. khoor 2. 0x68 0x65 0x6c

    0x6c 0x6f 3. hyvää päivää
  5. WHAT is cipher ? 1. khoor ct.each_char.map{|c| (c.ord - 3).chr

    } 2. 0x68 0x65 0x6c 0x6c 0x6f ct.map &:chr 3. hyvää päivää ct.i18n(“fi”, “en-us”)
  6. WHICH cipher ? Mobile app conditions: -  Large data ->

    Splittable -  for many times -> Fast -  on mobile -> Low electricity
  7. WHICH cipher ? Rijndael (AES) -  NSA / CRYPTREC standard

    -  .NET standard -  Block cipher (splittable) -  Fast
  8. WHICH cipher ? AES vs Speck 6372 bytes / Round

    trip 10 times average on C# with ICryptTransform
  9. Simon & Speck -  Feistel based -  Combination of bit

    operation and key schedule -  Check Wikipedia out !
  10. F Sample F PL Kr <<< 1 & <<< 8

    PR PL Kr PR <<< 3
  11. Legend <<< n >>> n x << n x >>

    n 101 << 10 = 10100 10100 >> 11 = 10 x ^ y 10101 ^ 1100 = 11001 & x & y 10101 & 101 = 101 x + y 101 + 10010 = 10111 XOR AND ADD ROTATE
  12. Legend <<< n >>> n x << n x >>

    n c >> n c << n x ^ y c ^ y & x & y - x + y c - y ROTATE XOR AND ADD