Ïîäõîä ê ñîçäàíèþ òðóäíîàíàëèçèðóåìûõ øèôðîâ

       

Çàøèôðîâêà


ôàçà 1 – çàùèòà îò èçìåíåíèé â èñõîäíîì òåêñòå

// ïðÿìîé õîä                                                                                             (3.5)

prev = 0;

äëÿ i îò 1 äî k

{

          next = ñèãíàòóðà(prev, ai);

          ai = f(prev, ai);

          prev = next;

}

// îáðàòíûé õîä                                                                                          (3.6)

prev = 0;

äëÿ i îò k äî 1

{



          next = ñèãíàòóðà(prev, ai);

          ai = f(prev, ai);

          prev = next;

}

ôàçà 2 – çàùèòà îò èçìåíåíèé â çàøèôðîâàííîì òåêñòå

// ïðÿìîé õîä                                                                                             (3.7)

prev = 0;

äëÿ i îò 1 äî k

{

          ai = f(prev, ai);

          prev = ñèãíàòóðà(prev, ai);

}

// îáðàòíûé õîä                                                                                          (3.8)

prev = 0;

äëÿ i îò k äî 1

{

          ai = f(prev, ai);

          prev = ñèãíàòóðà(prev, ai);

}



Ñîäåðæàíèå ðàçäåëà