The replaced code is licensed as GPLv2 only unlike the rest of libosmocore which is GPLv2+ The replacement is adopted from Nettle cryptographic library: http://www.lysator.liu.se/~nisse/nettle/
All the files are taken as is with exception of aes-internal.h which was significantly reduced.
Of course personally I would prefer just to link to Nettle but during the discussing over irc and ML there's been strong voices against introducing extra dependencies.