Lines Matching defs:stp
498 fb64_stream_iv(Block seed, struct stinfo *stp)
501 memmove((void *)stp->str_iv, (void *)seed, sizeof(Block));
502 memmove((void *)stp->str_output, (void *)seed, sizeof(Block));
504 des_key_sched(&stp->str_ikey, stp->str_sched);
506 stp->str_index = sizeof(Block);
510 fb64_stream_key(Block *key, struct stinfo *stp)
512 memmove((void *)stp->str_ikey, (void *)key, sizeof(Block));
513 des_key_sched(key, stp->str_sched);
515 memmove((void *)stp->str_output, (void *)stp->str_iv, sizeof(Block));
517 stp->str_index = sizeof(Block);
545 register struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1];
548 idx = stp->str_index;
552 des_ecb_encrypt(&stp->str_output, &b, stp->str_sched, 1);
553 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
558 *s = stp->str_output[idx] = (stp->str_feed[idx] ^ *s);
562 stp->str_index = idx;
568 register struct stinfo *stp = &fb[CFB].streams[DIR_DECRYPT-1];
577 if (stp->str_index)
578 --stp->str_index;
582 idx = stp->str_index++;
585 des_ecb_encrypt(&stp->str_output, &b, stp->str_sched, 1);
586 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
587 stp->str_index = 1; /* Next time will be 1 */
592 stp->str_output[idx] = data;
593 return(data ^ stp->str_feed[idx]);
618 register struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1];
621 idx = stp->str_index;
625 des_ecb_encrypt(&stp->str_feed, &b, stp->str_sched, 1);
626 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
629 *s++ ^= stp->str_feed[idx];
632 stp->str_index = idx;
638 register struct stinfo *stp = &fb[OFB].streams[DIR_DECRYPT-1];
647 if (stp->str_index)
648 --stp->str_index;
652 idx = stp->str_index++;
655 des_ecb_encrypt(&stp->str_feed, &b, stp->str_sched, 1);
656 memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
657 stp->str_index = 1; /* Next time will be 1 */
661 return(data ^ stp->str_feed[idx]);