Lines Matching refs:stp

492 fb64_stream_iv(Block seed, struct stinfo *stp)
495 memmove((void *)stp->str_iv, (void *)seed, sizeof(Block));
496 memmove((void *)stp->str_output, (void *)seed, sizeof(Block));
498 des_key_sched((Block *)stp->str_ikey, stp->str_sched);
500 stp->str_index = sizeof(Block);
504 fb64_stream_key(Block key, struct stinfo *stp)
506 memmove((void *)stp->str_ikey, (void *)key, sizeof(Block));
507 des_key_sched((Block *)key, stp->str_sched);
509 memmove((void *)stp->str_output, (void *)stp->str_iv, sizeof(Block));
511 stp->str_index = sizeof(Block);
539 struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1];
542 idx = stp->str_index;
546 des_ecb_encrypt((Block *)stp->str_output, (Block *)b, stp->str_sched, 1);
547 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
552 *s = stp->str_output[idx] = (stp->str_feed[idx] ^ *s);
556 stp->str_index = idx;
562 struct stinfo *stp = &fb[CFB].streams[DIR_DECRYPT-1];
571 if (stp->str_index)
572 --stp->str_index;
576 idx = stp->str_index++;
579 des_ecb_encrypt((Block *)stp->str_output, (Block *)b, stp->str_sched, 1);
580 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
581 stp->str_index = 1; /* Next time will be 1 */
586 stp->str_output[idx] = data;
587 return(data ^ stp->str_feed[idx]);
612 struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1];
615 idx = stp->str_index;
619 des_ecb_encrypt((Block *)stp->str_feed, (Block *)b, stp->str_sched, 1);
620 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
623 *s++ ^= stp->str_feed[idx];
626 stp->str_index = idx;
632 struct stinfo *stp = &fb[OFB].streams[DIR_DECRYPT-1];
641 if (stp->str_index)
642 --stp->str_index;
646 idx = stp->str_index++;
649 des_ecb_encrypt((Block *)stp->str_feed, (Block *)b, stp->str_sched, 1);
650 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
651 stp->str_index = 1; /* Next time will be 1 */
655 return(data ^ stp->str_feed[idx]);