[PATCH] Add A5/3-4 cipher support

Max.Suraev at fairwaves.co
Tue Jun 17 23:09:34 UTC 2014


18.06.2014 00:15, Sylvain Munaut пишет:
>> Could you emphasize - why exactly introducing private header is such a disaster that
>> we have to waste time and efforts trying to not let it happen?
> 
> - It's a useless file that's used at exactly 1 place and not even for
> code used in installed libs but just for the test. At that point you
> might just as well just pre-declare them in the test source file
> directly.
> - It prevents making those function static
> - It requires static linking for the test
> - For the A5/[3/4] you bypass the osmo_a5 wrapper and thus don't cover
> a breakage that would happen there.
> 
> 
> The alternative solves all of the above and requires exactly 1 lines
> changes in the original _a5_4 function :
> 
> uint32_t fn_count = (fn_correct) ? osmo_a5_fn_count(fn) : fn;
> 
> becomes
> 
> uint32_t fn_count = (fn & (1<<31)) ? (fn & ~(1<<31)) : osmo_a5_fn_count(fn);
> 
> 

I probably apply it wrongly - test still fails for me.
Feel free to commit your variant though - I think it's less readable but as long as
it works and covered by test suit it's fine.


-- 
best regards,
Max, http://fairwaves.co




More information about the baseband-devel mailing list