Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aes descramble support #439

Closed
wants to merge 42 commits into from
Closed

Aes descramble support #439

wants to merge 42 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 1, 2014

A first effort to get AES descrambling working in TvHeadend. For now it just replaces ffdecsa but this will be corrected.

${BUILDDIR}/src/descrambler/ffdecsa/ffdecsa_sse2.o : CFLAGS += -msse2
SRCS-yes += src/descrambler/libaesdec/libaesdec_interface.c \
src/descrambler/libaesdec/libaesdec.c
${BUILDDIR}/src/descrambler/libaesdec/libaesdec.o : CFLAGS += -msse2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line. The CPU-intensive AES functions are implemented in the openssl libs. No extra CFLAGS necessary.

@perexg
Copy link
Contributor

perexg commented Aug 1, 2014

OK, I tried to describe what I think, but I ended with the code..

Please, make your changes on top of 4bf8754 . I created some empty functions / blocks for AES and also the cwc.c should be enhanced for AES support.. The patch should be self-explaining, but if you have any questions, ask...

@@ -300,6 +300,9 @@ ${BUILDDIR}/src/descrambler/ffdecsa/ffdecsa_mmx.o : CFLAGS += -mmmx
${BUILDDIR}/src/descrambler/ffdecsa/ffdecsa_sse2.o : CFLAGS += -msse2
endif

# libaesdec
SRCS-yes += src/descrambler/libaesdec/libaesdec.c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be SRCS-${CONFIG_SSL} += ....

@ghost
Copy link
Author

ghost commented Aug 5, 2014

Thank you for your comments, I updated the code as you requested. Do you think it is acceptable now?

@@ -28,7 +28,8 @@ static void
tvhcsa_aes_descramble
( tvhcsa_t *csa, struct mpegts_service *s, const uint8_t *tsb )
{
/* Not Implemented Yet */
aes_decrypt_packet(csa->csa_aes_keys, (unsigned char *)tsb);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indention....

@perexg
Copy link
Contributor

perexg commented Aug 5, 2014

@spdfrk1 : We are close to merge...

@ghost
Copy link
Author

ghost commented Aug 5, 2014

Haha, thank you for your patience! I updated the indentation and added static inline for the empty functions.

@ghost
Copy link
Author

ghost commented Aug 5, 2014

Also just signed the CLA, sorry about not doing that earlier.

@ghost
Copy link
Author

ghost commented Aug 5, 2014

Hmm, I signed it and needed to add a stray username (using Linux git can cause github to think I am another user?), but I still see some failures to merge.
Also thank you for the compliment at IRC! Even though you did the hardest work in preparing the master ;)

@perexg
Copy link
Contributor

perexg commented Aug 6, 2014

Pulled, merged, rebased... The code is in the tvh master tree. Thanks.

@perexg perexg closed this Aug 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants