# bn_mul.h File Reference

## Detailed Description

Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org> All rights reserved.

Joined copyright on original XySSL code with: Christophe Devine

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file bn_mul.h.

`#include "polarssl/config.h"`

Go to the source code of this file.

## Defines
#define | MULADDC_CORE
#define | MULADDC_INIT
#define | MULADDC_STOP }

## Define Documentation

#define MULADDC_CORE

Value:

    s0 = ( *s << biH ) >> biH;          \
        s1 = ( *s >> biH ); s++;            \
        rx = s0 * b1; r0 = s0 * b0;         \
        ry = s1 * b0; r1 = s1 * b1;         \
        r1 += ( rx >> biH );                \
        r1 += ( ry >> biH );                \
        rx <<= biH; ry <<= biH;             \
        r0 += rx; r1 += (r0 < rx);          \
        r0 += ry; r1 += (r0 < ry);          \
        r0 +=  c; r1 += (r0 <  c);          \
        r0 += *d; r1 += (r0 < *d);          \
        c = r1; *(d++) = r0;

Definition at line 714 of file bn_mul.h.

#define MULADDC_INIT

Value:

    {                                       \
        t_int s0, s1, b0, b1;               \
        t_int r0, r1, rx, ry;               \
        b0 = ( b << biH ) >> biH;           \
        b1 = ( b >> biH );

Definition at line 707 of file bn_mul.h.

#define MULADDC_STOP }

Definition at line 728 of file bn_mul.h.