Some study Bibles will say here that it's possible that Paul didn't know who he was talking to, that his bad eyesight or some other factor could have made him unaware that he was speaking to the high priest. I don't know how or why you could come to this conclusion. If we read the speech just previous to this, Paul goes to great length to establish that he himself was a zealous Pharisee. He obviously would have been able to distiguish the High Priest from anyone else. In fact his statement "God is going to strike you, you whitewashed wall! Are you sitting to judge me according to the law, and yet contrary to the law you order me to be struck?" Who else would Paul have been speaking to in the context of "sitting to judge according to the law", this was obviously addressed to the council, Ananias being it's head.

The reality is this, Paul does not recognize Ananias as the High Priest. Paul KNOWS that Christ is the High Priest (read Hebrews 7&8, I realize that we don't know if Paul wrote Hebrews, but it would have still been Paul's theology). Paul sees Ananias not only as an impostor, but in mockery of Jesus Christ. Paul is calling the imposter out, and then when confronted, I believe he responds with sarcasm "I did not know, brothers, that he was the high priest, for it is written, You shall not speak evil of a ruler of your people." Paul knows that God establishes true authority, and man's authority often stands as an imposter and mocker of what God has established. Read my notes on Romans 13. Blind obedience to earthly authority is not what is advocated, rather we must humble ourselves before the Lord and have him reveal to us the authority that He has established. Paul saw the High Priest standing in the place of Christ. This would have both saddened and angered him.

His words "You whitewashed walls" hearken me back to Mathew 23 when Jesus called the Pharisees "whitewashed tombs". It may be that the people in this audience also hearkened back to Jesus's words, as I'm sure Jesus's rebuke to the Pharisees and scribes was famous among the people. The people here with Paul may have even been some of the very same people Jesus was rebuking. Surely the very Pharisees that Jesus rebuked proudly mocked Him when they crucified Him, thinking that they had avenged themselves againsts Christ's scourging words. Here is Paul calling into question the victory of the Pharisees over Christ, even going so far as rebuking the High Priest and then with thick sarcasm implying that he is not the high priest.

To accept that Paul would honor that Ananias be recognized as the High Priest means that Paul is recognizing the old covenant as still in effect. The old covenant is obsoleted by the sacrifice of Christ, who is the High Priest forever.

Acts 23:3-5