> On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote:
> > This approach has the advantage that users can select specific
> > parser actions by using a general parser with function pointers
> > to specific actions.
> 
> I don't understand why we need different parsing functions in the
> first place.  Can't they just return raw integers always?
> 
> You can then trivially convert the raw integers to MPI, no?

We need different parsing functions so that we don't allocate duplicate buffers 
for the same data.

You need to allocate buffers when getting the raw integers and you need to 
allocate other (duplicate) buffers when converting the raw integers to MPI.

Using the proposed API each user can select the format of data he wants, 
eliminating the need of a double conversion (with its drawbacks: duplicate 
buffers, unnecessary cycles).

Thanks,
ta
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to